@@ -34,6 +34,21 @@ export const nagSuppressions = (stack: Stack) => {
3434 ]
3535 )
3636
37+ // Suppress wildcard log permissions for SyncKnowledgeBase Lambda
38+ safeAddNagSuppression (
39+ stack ,
40+ "/EpsAssistMeStack/Functions/SyncKnowledgeBaseFunction/LambdaPutLogsManagedPolicy/Resource" ,
41+ [
42+ {
43+ id : "AwsSolutions-IAM5" ,
44+ reason : "Wildcard permissions are required for log stream access under known paths." ,
45+ appliesTo : [
46+ "Resource::<FunctionsSyncKnowledgeBaseFunctionLambdaLogGroupB19BE2BE.Arn>:log-stream:*"
47+ ]
48+ }
49+ ]
50+ )
51+
3752 // Suppress API Gateway validation warning for Apis construct
3853 safeAddNagSuppression (
3954 stack ,
@@ -146,6 +161,22 @@ export const nagSuppressions = (stack: Stack) => {
146161 ]
147162 )
148163
164+ // Suppress wildcard permissions for SyncKnowledgeBase managed policy
165+ safeAddNagSuppression (
166+ stack ,
167+ "/EpsAssistMeStack/IamResources/SyncKnowledgeBaseManagedPolicy/Resource" ,
168+ [
169+ {
170+ id : "AwsSolutions-IAM5" ,
171+ reason : "SyncKnowledgeBase Lambda needs access to knowledge bases and data sources for synchronization." ,
172+ appliesTo : [
173+ "Resource::arn:aws:bedrock:eu-west-2:undefined:knowledge-base/*" ,
174+ "Resource::arn:aws:bedrock:eu-west-2:undefined:knowledge-base/*/data-source/*"
175+ ]
176+ }
177+ ]
178+ )
179+
149180 // Suppress S3 server access logs for knowledge base documents bucket
150181 safeAddNagSuppression (
151182 stack ,
@@ -180,6 +211,36 @@ export const nagSuppressions = (stack: Stack) => {
180211 }
181212 ]
182213 )
214+
215+ // Suppress AWS managed policy usage in BucketNotificationsHandler
216+ safeAddNagSuppression (
217+ stack ,
218+ "/EpsAssistMeStack/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource" ,
219+ [
220+ {
221+ id : "AwsSolutions-IAM4" ,
222+ reason : "Auto-generated CDK role uses AWS managed policy for basic Lambda execution." ,
223+ appliesTo : [
224+ "Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
225+ ]
226+ }
227+ ]
228+ )
229+
230+ // Suppress wildcard permissions for BucketNotificationsHandler default policy
231+ safeAddNagSuppression (
232+ stack ,
233+ "/EpsAssistMeStack/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource" ,
234+ [
235+ {
236+ id : "AwsSolutions-IAM5" ,
237+ reason : "Auto-generated CDK role requires wildcard permissions for S3 bucket notifications." ,
238+ appliesTo : [
239+ "Resource::*"
240+ ]
241+ }
242+ ]
243+ )
183244}
184245
185246const safeAddNagSuppression = ( stack : Stack , path : string , suppressions : Array < NagPackSuppression > ) => {
0 commit comments