Skip to content

Commit

Permalink
fix: do not suppress Kendra default policy unless createIndex is chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
dairiley committed Jan 24, 2024
1 parent 1aa3280 commit cf3c27a
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions lib/aws-genai-llm-chatbot-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,21 @@ export class AwsGenAILLMChatbotStack extends cdk.Stack {
},
]
);
NagSuppressions.addResourceSuppressionsByPath(
this,
[
`/${this.stackName}/RagEngines/KendraRetrieval/KendraRole/DefaultPolicy/Resource`,
],
[
{
id: "AwsSolutions-IAM5",
reason:
"Access to all log groups required for CloudWatch log group creation.",
},
]
);
if (props.config.rag.engines.kendra.createIndex) {
NagSuppressions.addResourceSuppressionsByPath(
this,
[
`/${this.stackName}/RagEngines/KendraRetrieval/KendraRole/DefaultPolicy/Resource`,
],
[
{
id: "AwsSolutions-IAM5",
reason:
"Access to all log groups required for CloudWatch log group creation.",
},
]
);
}
}
}
// Implicitly created resources with changing paths
Expand Down

0 comments on commit cf3c27a

Please sign in to comment.