23.06.2023 Views

AWS

4 weeks subscription

4 weeks subscription

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Amazon Simple Queue Service Developer Guide<br />

Example <strong>AWS</strong> IAM Policies for Amazon SQS<br />

Example 2: Allow developers to write messages to a shared test queue<br />

In this example, we create a group for developers and attach a policy that lets the group use the Amazon<br />

SQS SendMessage action, but only with the <strong>AWS</strong> Account's queue named CompanyTestQueue.<br />

{<br />

}<br />

"Statement":[{<br />

"Effect":"Allow",<br />

"Action":"sqs:SendMessage",<br />

"Resource":"arn:aws:sqs:*:123456789012:CompanyTestQueue"<br />

}<br />

]<br />

Example 3: Allow managers to get the general size of queues<br />

In this example, we create a group for managers and attach a policy that lets the group use the Amazon<br />

SQS GetQueueAttributes action with all of the <strong>AWS</strong> Account's queues.<br />

{<br />

}<br />

"Statement":[{<br />

"Effect":"Allow",<br />

"Action":"sqs:GetQueueAttributes",<br />

"Resource":"*"<br />

}<br />

]<br />

API Version 2009-02-01<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!