Skip to content

Commit a27a116

Browse files
committed
fixes
1 parent 77c5be3 commit a27a116

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.tools/test/stacks/plugin/typescript/plugin_stack.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ g
208208
lambdaFunction: lambda.Function,
209209
sqsQueue: sqs.Queue,
210210
): void {
211+
// Add the SQS queue as an event source for the Lambda function.
211212
lambdaFunction.addEventSource(new SqsEventSource(sqsQueue));
213+
// Grant permissions to allow the function to receive messages from the queue.
212214
sqsQueue.grantConsumeMessages(lambdaFunction);
215+
// Add IAM policy to the Lambda function's execution role to allow it to receive messages from the SQS queue.
213216
lambdaFunction.addToRolePolicy(
214217
new iam.PolicyStatement({
215218
actions: ["sqs:ReceiveMessage"],

0 commit comments

Comments
 (0)