Skip to content

Commit

Permalink
Add sqs:ChangeMessageVisibility permission to Queue
Browse files Browse the repository at this point in the history
  • Loading branch information
martindanielsson committed Mar 7, 2023
1 parent f408415 commit 9b9dab2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/constructs/aws/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export class Queue extends AwsConstruct {
}

permissions(): PolicyStatement[] {
return [new PolicyStatement("sqs:SendMessage", [this.queue.queueArn])];
return [new PolicyStatement(["sqs:SendMessage", "sqs:ChangeMessageVisibility"], [this.queue.queueArn])];
}

extend(): Record<string, CfnResource> {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/queues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe("queues", () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Statement: expect.arrayContaining([
{
Action: "sqs:SendMessage",
Action: ["sqs:SendMessage", "sqs:ChangeMessageVisibility"],
Effect: "Allow",
Resource: [
{
Expand Down

0 comments on commit 9b9dab2

Please sign in to comment.