sqs-dg-2009-02-01
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Amazon Simple Queue Service Developer Guide<br />
Amazon SQS Policy Examples<br />
}<br />
}<br />
"Resource": "/987654321098/queue1"<br />
The following example policy gives all users ReceiveMessage permission for the queue named<br />
987654321098/queue1.<br />
{<br />
}<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
"Statement":<br />
{<br />
"Sid":"Queue1_AnonymousAccess_ReceiveMessage",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "*"<br />
},<br />
"Action": "<strong>sqs</strong>:ReceiveMessage",<br />
"Resource": "/987654321098/queue1"<br />
}<br />
The following example policy gives all users ReceiveMessage permission for the queue named<br />
987654321098/queue1, but only between noon and 3:00 p.m. on January 31, <strong>2009</strong>.<br />
{<br />
}<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
"Statement":<br />
{<br />
"Sid":"Queue1_AnonymousAccess_ReceiveMessage_TimeLimit",<br />
"Effect": "Allow",<br />
"Principal": {<br />
"AWS": "*"<br />
},<br />
"Action": "<strong>sqs</strong>:ReceiveMessage",<br />
"Resource": "/987654321098/queue1",<br />
"Condition" : {<br />
"DateGreaterThan" : {<br />
"aws:CurrentTime":"<strong>2009</strong>-<strong>01</strong>-31T12:00Z"<br />
},<br />
"DateLessThan" : {<br />
"aws:CurrentTime":"<strong>2009</strong>-<strong>01</strong>-31T15:00Z"<br />
}<br />
}<br />
}<br />
The following example policy gives all users permission to use all possible SQS actions that can be shared<br />
for the queue named 987654321098/queue1, but only if the request comes from the 192.168.143.0/24<br />
range.<br />
{<br />
"Version": "2008-10-17",<br />
"Id": "Queue1_Policy_UUID",<br />
API Version <strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />
58