29.07.2020 Views

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

Amazon SQS Keys

Amazon SQS Keys

Amazon SQS implements the following policy keys, but no others. For more information about policy

keys, see Condition (p. 50).

AWS-Wide Policy Keys

• aws:CurrentTime (for date/time conditions)

• aws:EpochTime (the date in epoch or UNIX time, for use with date/time conditions)

• aws:SecureTransport (Boolean representing whether the request was sent using SSL)

• aws:SourceIp (the requester's IP address, for use with IP address conditions)

• aws:UserAgent (information about the requester's client application, for use with string conditions)

If you use aws:SourceIp, and the request comes from an Amazon EC2 instance, we evaluate the

instance's public IP address to determine if access is allowed.

For services that use only SSL, such as Amazon RDS and Amazon Route 53, the aws:SecureTransport

key has no meaning.

The key names are case insensitive. For example, aws:CurrentTime is equivalent to AWS:currenttime.

Example AWS IAM Policies for Amazon SQS

This section shows several simple AWS IAM policies for controlling User access to Amazon SQS.

Note

In the future, Amazon SQS might add new actions that should logically be included in one of the

following policies, based on the policy’s stated goals.

Example 1: Allow a User to create and use his or her own queues

In this example, we create a policy for Bob that lets him access all Amazon SQS actions, but only with

queues whose names begin with the literal string bob_queue.

Note

Amazon SQS doesn't automatically grant the creator of a queue permission to subsequently use

the queue. Therefore, in our AWS IAM policy, we must explicitly grant Bob permission to use all

the SQS actions in addition to CreateQueue.

{

}

"Statement":[{

"Effect":"Allow",

"Action":"sqs:*",

"Resource":"arn:aws:sqs:*:123456789012:bob_queue*"

}

]

API Version 2009-02-01

68

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

Saved successfully!

Ooh no, something went wrong!