Skip to content

Commit 30727a3

Browse files
committed
Remove unnecessary bucket permission to invoke sync Lambda function
1 parent a7c60e3 commit 30727a3

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

packages/cdk/nagSuppressions.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,6 @@ export const nagSuppressions = (stack: Stack) => {
4949
]
5050
)
5151

52-
// Suppress S3 wildcard permissions for SyncKnowledgeBase Lambda default policy
53-
safeAddNagSuppression(
54-
stack,
55-
"/EpsAssistMeStack/Functions/SyncKnowledgeBaseFunction/LambdaRole/DefaultPolicy/Resource",
56-
[
57-
{
58-
id: "AwsSolutions-IAM5",
59-
reason: "S3 wildcard permissions are required for Lambda to read from knowledge base documents bucket.",
60-
appliesTo: [
61-
"Action::s3:GetBucket*",
62-
"Action::s3:GetObject*",
63-
"Action::s3:List*",
64-
"Resource::<StorageDocsBucketepsampr20Docs075F648F.Arn>/*",
65-
"Resource::<StorageDocsBucketepsamDocsF25F63F1.Arn>/*"
66-
]
67-
}
68-
]
69-
)
70-
7152
// Suppress API Gateway validation warning for Apis construct
7253
safeAddNagSuppression(
7354
stack,

packages/cdk/stacks/EpsAssistMeStack.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ export class EpsAssistMeStack extends Stack {
133133
vectorKB.dataSource.attrDataSourceId
134134
)
135135

136-
// Grant S3 bucket permission to invoke the sync Lambda function
137-
storage.kbDocsBucket.bucket.grantRead(functions.functions.syncKnowledgeBase.function)
138-
139136
// Add S3 event source mapping to sync Lambda function
140137
functions.functions.syncKnowledgeBase.function.addEventSource(
141138
new S3EventSource(storage.kbDocsBucket.bucket, {

0 commit comments

Comments
 (0)