aws-genai-llm-chatbot icon indicating copy to clipboard operation
aws-genai-llm-chatbot copied to clipboard

Cannot deploy solution : Error: Specify at least one log group name

Open fredbonin opened this issue 7 months ago • 1 comments

Issue Description

When initially deploying the solution, I encountered the following error:

Error: Specify at least one log group name.
    at new LogQueryWidget (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/node_modules/aws-cdk-lib/aws-cloudwatch/lib/log-query.js:1:1200)
    at Monitoring.getLogsWidget (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/lib/monitoring/index.ts:513:12)
    at new Monitoring (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/lib/monitoring/index.ts:102:14)
    at new AwsGenAILLMChatbotStack (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/lib/aws-genai-llm-chatbot-stack.ts:224:33)
    at Object.<anonymous> (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/bin/aws-genai-llm-chatbot.ts:13:1)
    at Module._compile (node:internal/modules/cjs/loader:1529:14)
    at Module.m._compile (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/fbonin/IdeaProjects/clean/ext/aws/github/aws-genai-llm-chatbot/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1275:32)

Root Cause

This issue occurs because the monitoring stack attempts to reference log groups that don't exist. The specific code in aws-genai-llm-chatbot-stack.ts causing the problem is:

appsyncResolversLogGroups: chatBotApi.resolvers.map((r) => {
  return LogGroup.fromLogGroupName(
    monitoringStack,
    "Log" + r.node.id,
    "/aws/lambda/" + r.functionName
  );
})

The LogGroup.fromLogGroupName() method expects these log groups to already exist, but they don't.

Current Workaround

Currently, I've found a workaround by commenting out the monitoring stack.

fredbonin avatar Apr 21 '25 12:04 fredbonin

This happens only if you select N here:

Image

Since Bedrock is already enabled in my AWS account, I thought the answer to the question should be N.

fredbonin avatar Apr 21 '25 13:04 fredbonin

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jun 21 '25 02:06 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Jul 21 '25 02:07 github-actions[bot]