| Did this page help you? Yes No Tell us about it... |
The following sections describe the concepts you need to understand to use the access policy language. They're presented in a logical order, with the first terms you need to know at the top of the list.
A permission is the concept of allowing or disallowing some kind of access to a particular resource or action. Permissions essentially follow this form: "A is/isn't allowed to do B to C where D applies." For example, Jane (A) has permission to receive messages (B) from Amazon SQS queue named queue12345 (C), as long as she asks to receive them before midnight on May 30, 2010 (D). Whenever Jane sends a request to Amazon SQS to use queue12345, the service checks to see if she has permission and if the request satisfies the conditions set forth in the permission.
A statement is the formal description of a single permission, written in the access policy language. You always write a statement as part of a broader container document known as a policy (see the next concept).
A policy is a document (written in the
access policy language) that acts as a container for one or more statements. For example,
a policy could have two statements in it: one that states that Jane can use the
Amazon SQS SendMessage action, and another that states that
Jane can use all the Amazon S3 actions. As shown in the following figure, an
equivalent scenario would be to have two policies, one containing the statement that
Jane can use SendMessage, and another containing the statement
that Jane can use all Amazon S3 actions.

AWS uses the information in the statements (whether they're contained in a single policy or multiple) to determine if someone requesting access to a resource should be granted that access. We often use the term policy interchangeably with statement, as they generally represent the same concept (an entity that represents a permission).
The principal is the person or persons who receive the permission in the policy. The principal is A in the statement "A has permission to do B to C where D applies." When you write a policy specifically to grant permission to a user or group, you don't explicitly state that user or group as the principal in the policy. Instead, you attach the policy to a user or group, and the principal is therefore implied.
The action is the activity the principal has permission to
perform. The action is B in the statement "A has permission to do B to C where D
applies." Typically, the action is just the operation in the request to AWS. For example, Jane sends a request to Amazon SQS
with Action=ReceiveMessage. You can
specify one or multiple actions in a policy.
For the names of the actions you can specify in a policy, see Integrating with Other AWS Products.
The resource is the object the principal is requesting access to. The resource is C in the statement "A has permission to do B to C where D applies." You can specify one or more resources in a policy. For information about to specify a resource in a policy, see ARNs.
The conditions are any restrictions or details about the permission. The condition is D in the statement "A has permission to do B to C where D applies." The part of the policy that specifies the conditions can be the most detailed and complex of all the parts. Typical conditions are related to:
Date and time (e.g., the request must arrive before a specific day)
IP address (e.g., the requester's IP address must be part of a particular CIDR range)
A key is the specific characteristic that is the basis for access restriction. For example, the date and time of request.
You use both conditions and keys
together to express the restriction. The easiest way to understand how you actually
implement a restriction is with an example: If you want to restrict access to before
May 30, 2010, you use the condition called DateLessThan. You use the
key called
aws:CurrentTime
and set it to the value 2010-05-30T00:00:00Z. AWS defines the
conditions and keys you can use. The AWS product of interest itself (e.g., Amazon
SimpleDB) might also define service-specific keys. For more information
about conditions, see Condition. For
more information about the available keys, see Available Keys.
The requester is the person who sends a request to an AWS service and asks for access to a particular resource. The requester sends a request to AWS that essentially says: "Will you allow me to do B to C where D applies?"
Evaluation is the process the AWS service uses to determine if an incoming request should be denied or allowed based on the applicable policies. For information about the evaluation logic, see Evaluation Logic.
The effect is the result that you want a policy statement to return at evaluation time. You specify this value when you write the statements in a policy, and the possible values are deny and allow.
For example, you could write a policy that has a statement that denies all requests that come from Antarctica (effect=deny given that the request uses an IP address allocated to Antarctica). Alternately, you could write a policy that has a statement that allows all requests that don't come from Antarctica (effect=allow, given that the request doesn't come from Antarctica). Although the two statements sound like they do the same thing, in the access policy language logic, they are different. For more information, see Evaluation Logic.
Although there are only two possible values you can specify for the effect (allow or deny), there can be three different results at policy evaluation time: default deny, allow, or explicit deny. For more information, see the following concepts and Evaluation Logic.
A default deny is the default result from a policy in the absence of an allow or explicit deny. For example, if a user requests to use Amazon SQS, but the only policy that applies to the user states that the user can use Amazon SimpleDB, then that policy results in a default deny.