Condition policy examples - Amazon Identity and Access Management
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Condition policy examples

In IAM policies, you can specify multiple values for both single-valued and multivalued context keys for comparison against the request context. The following set of policy examples demonstrates policy conditions with multiple context keys and values.

Note

If you would like to submit a policy to be included in this reference guide, use the Feedback button at the bottom of this page. For IAM identity-based policy examples, see Example IAM identity-based policies.

Condition policy examples: Single-valued context keys

  • Multiple condition blocks with single-valued context keys. (View this example.)

  • One condition block with multiple single-valued context keys and values. (View this example.)

Condition policy examples: Multivalued context keys