Skip to content

Commit aac6b33

Browse files
committed
Remove invalid suppressions and add correct BucketNotificationsHandler suppressions
1 parent d019ac1 commit aac6b33

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

packages/cdk/nagSuppressions.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,28 +214,29 @@ export const nagSuppressions = (stack: Stack) => {
214214
]
215215
)
216216

217-
// Suppress custom resource IAM permissions for S3 Lambda notification
217+
// Suppress AWS managed policy usage in BucketNotificationsHandler
218218
safeAddNagSuppression(
219219
stack,
220-
"/EpsAssistMeStack/S3ToSyncKnowledgeBase/BucketNotification/CustomResourcePolicy/Resource",
220+
"/EpsAssistMeStack/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource",
221221
[
222222
{
223-
id: "AwsSolutions-IAM5",
224-
reason: "Custom resource requires wildcard permissions to manage S3 bucket notifications and Lambda permissions.",
223+
id: "AwsSolutions-IAM4",
224+
reason: "Auto-generated CDK role uses AWS managed policy for basic Lambda execution.",
225225
appliesTo: [
226-
"Resource::*"
226+
"Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
227227
]
228228
}
229229
]
230230
)
231231

232+
// Suppress wildcard permissions for BucketNotificationsHandler default policy
232233
safeAddNagSuppression(
233234
stack,
234-
"/EpsAssistMeStack/S3ToSyncKnowledgeBase/LambdaPermission/CustomResourcePolicy/Resource",
235+
"/EpsAssistMeStack/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource",
235236
[
236237
{
237238
id: "AwsSolutions-IAM5",
238-
reason: "Custom resource requires wildcard permissions to manage Lambda permissions.",
239+
reason: "Auto-generated CDK role requires wildcard permissions for S3 bucket notifications.",
239240
appliesTo: [
240241
"Resource::*"
241242
]

0 commit comments

Comments
 (0)