aws-genai-llm-chatbot
aws-genai-llm-chatbot copied to clipboard
Cannot deploy solution : Error: Specify at least one log group name
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.
This happens only if you select N here:
Since Bedrock is already enabled in my AWS account, I thought the answer to the question should be N.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 30 days since being marked as stale.