IAM policy elements: Variables and tags
Use IAM policy variables as placeholders when you don't know the exact value of a resource or condition key when you write the policy.
The following example shows a policy for an S3 bucket that uses a policy variable:
When this policy is evaluated, IAM replaces the variable
${aws:username}
with the name of the actual current user.Policy variables were introduced in version
2012-10-17
, so earlier versions of the policy language don't support policy variables.
Last updated
Was this helpful?