Skip to content

Commit 3e303a4

Browse files
committed
fixes
1 parent a27a116 commit 3e303a4

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
@@ -210,15 +210,18 @@ g
210210
): void {
211211
// Add the SQS queue as an event source for the Lambda function.
212212
lambdaFunction.addEventSource(new SqsEventSource(sqsQueue));
213+
213214
// Grant permissions to allow the function to receive messages from the queue.
214215
sqsQueue.grantConsumeMessages(lambdaFunction);
216+
215217
// Add IAM policy to the Lambda function's execution role to allow it to receive messages from the SQS queue.
216218
lambdaFunction.addToRolePolicy(
217219
new iam.PolicyStatement({
218220
actions: ["sqs:ReceiveMessage"],
219221
resources: [sqsQueue.queueArn],
220222
}),
221223
);
224+
// Additionally, ensure the Lambda function can create and write to CloudWatch Logs.
222225
lambdaFunction.addToRolePolicy(
223226
new iam.PolicyStatement({
224227
actions: [

0 commit comments

Comments
 (0)