Skip to content

Commit

Permalink
Merge pull request #333 from dairiley/fix_nag_suppression_kendra_exte…
Browse files Browse the repository at this point in the history
…rnal_index

fix: do not suppress Kendra default policy unless createIndex is chosen
  • Loading branch information
massi-ang authored Jan 24, 2024
2 parents 1aa3280 + cf3c27a commit 4a4fa8e
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 4a4fa8e

Please sign in to comment.