sqs-dg-2009-02-01
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 />
Amazon SQS Policy Examples<br />
Amazon SQS Policy Examples<br />
This section shows example policies for common Amazon SQS use cases.<br />
The following example policy gives the developer with AWS account number 123456789<strong>01</strong>2 the<br />
SendMessage permission for the queue named 987654321098/queue1.<br />
{<br />
}<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
"Statement":<br />
{<br />
"Sid":"Queue1_SendMessage",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "123456789<strong>01</strong>2"<br />
},<br />
"Action": "<strong>sqs</strong>:SendMessage",<br />
"Resource": "/987654321098/queue1"<br />
}<br />
The following example policy gives the developer with AWS account number 123456789<strong>01</strong>2 both the<br />
SendMessage and ReceiveMessage permission for the queue named 987654321098/queue1.<br />
{<br />
}<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
"Statement":<br />
{<br />
"Sid":"Queue1_Send_Receive",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "123456789<strong>01</strong>2"<br />
},<br />
"Action": ["<strong>sqs</strong>:SendMessage","<strong>sqs</strong>:ReceiveMessage"],<br />
"Resource": "/987654321098/queue1"<br />
}<br />
The following example policy gives two different developers (with AWS account numbers 123456789<strong>01</strong>2<br />
and 555566667777) permission to use all actions that SQS allows shared access for the queue named<br />
987654321098/queue1.<br />
{<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
"Statement":<br />
{<br />
"Sid":"Queue1_AllActions",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": ["123456789<strong>01</strong>2","555566667777"]<br />
},<br />
"Action": "<strong>sqs</strong>:*",<br />
API Version <strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />
57