We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77c5be3 commit a27a116Copy full SHA for a27a116
.tools/test/stacks/plugin/typescript/plugin_stack.ts
@@ -208,8 +208,11 @@ g
208
lambdaFunction: lambda.Function,
209
sqsQueue: sqs.Queue,
210
): void {
211
+ // Add the SQS queue as an event source for the Lambda function.
212
lambdaFunction.addEventSource(new SqsEventSource(sqsQueue));
213
+ // Grant permissions to allow the function to receive messages from the queue.
214
sqsQueue.grantConsumeMessages(lambdaFunction);
215
+ // Add IAM policy to the Lambda function's execution role to allow it to receive messages from the SQS queue.
216
lambdaFunction.addToRolePolicy(
217
new iam.PolicyStatement({
218
actions: ["sqs:ReceiveMessage"],
0 commit comments