Skip to content

Commit a3b2bed

Browse files
committed
Remove explicit Lambda permission with guaranteed SourceAccount
1 parent fae978e commit a3b2bed

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

packages/cdk/stacks/EpsAssistMeStack.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
} from "aws-cdk-lib"
77
import {EventType} from "aws-cdk-lib/aws-s3"
88
import {LambdaDestination} from "aws-cdk-lib/aws-s3-notifications"
9-
import {CfnPermission} from "aws-cdk-lib/aws-lambda"
109
import {nagSuppressions} from "../nagSuppressions"
1110
import {Apis} from "../resources/Apis"
1211
import {Functions} from "../resources/Functions"
@@ -140,15 +139,6 @@ export class EpsAssistMeStack extends Stack {
140139
new LambdaDestination(functions.functions.syncKnowledgeBase.function)
141140
)
142141

143-
// Create explicit Lambda permission with guaranteed SourceAccount
144-
new CfnPermission(this, "S3ToSyncKnowledgeBaseLambdaPermission", {
145-
functionName: functions.functions.syncKnowledgeBase.function.functionArn,
146-
action: "lambda:InvokeFunction",
147-
principal: "s3.amazonaws.com",
148-
sourceAccount: account,
149-
sourceArn: storage.kbDocsBucket.bucket.bucketArn
150-
})
151-
152142
// Create Apis and pass the Lambda function
153143
const apis = new Apis(this, "Apis", {
154144
stackName: props.stackName,

0 commit comments

Comments
 (0)