Skip to content
IAM Policy Generator

IAM condition keys come in global and service forms, and a missing key changes the result

IAM condition keys are named values in a request context that a policy Condition element tests. AWS lists 63 global aws: keys on its reference page, read 16 Nov 2026, plus service-specific keys. A key missing from the request makes most operators false and negated operators true, which the IfExists suffix changes.

Open the workbench ยท All guides

Global keys work in every service but not in every request

AWS defines global condition keys as keys that can be used across all AWS services. A key being usable in a policy does not mean it is in every request context. AWS gives aws:SourceAccount as an example: it is present only when the call to your resource is made directly by an AWS service principal.

The AWS global condition keys page groups its 63 aws: keys into five sets: properties of the principal, of a role session, of the network, of the resource and of the request. A further set holds cross-service keys, which carry a service prefix but are available across other services. AWS lists nine: ec2:RoleDelivery, ec2:SourceInstanceArn, glue:RoleAssumedBy, glue:CredentialIssuingService, codebuild:BuildArn, codebuild:ProjectArn, lambda:SourceFunctionArn, ssm:SourceInstanceArn and identitystore:UserId.

Service-specific keys work only for one service. AWS gives s3:VersionId as an example, which works only for requests to Amazon S3. Each service's keys are listed in the Service Authorization Reference, and the workbench's reference includes them for every action.

Operators fall into nine groups

The operator you can use depends on the key. AWS groups the operators into String, Numeric, Date and time, Boolean, Binary, IP address and ARN operators, plus the IfExists forms and the Null check. AWS's own Policy Generator configuration lists 55 operator names, read 16 Nov 2026. A few matter more than the rest.

OperatorUseExample key
StringEqualsExact, case sensitive matchaws:PrincipalTag/job-category
StringLikeMatch with * and ? wildcardss3:prefix
ArnLikeMatch an ARN with wildcardsaws:SourceArn
IpAddressMatch a CIDR rangeaws:SourceIp
BoolTrue or falseaws:SecureTransport
DateGreaterThanTime windowaws:CurrentTime
NullTest whether the key is presentany key
ForAllValues:StringEqualsEvery value in a multivalued key matchesaws:TagKeys
ForAnyValue:StringEqualsAt least one value matchesaws:TagKeys

A missing key makes most conditions false, and negated ones true

AWS states the rule in one place. If the key in a condition is not in the request context, the values do not match and the condition is false. If the condition requires that the key not match, such as StringNotLike or ArnNotLike, and the key is absent, the condition is true. The rule applies to all operators except the IfExists forms and the Null check, which test whether the key exists.

AWS shows the effect with aws:PrincipalTag/job-category. A user without the tag gets a false condition, and the statement does not apply. In an Allow statement that means no access. In a Deny statement it means the deny does not apply, which can leave a hole. A Deny written with a positive operator on a key that is sometimes absent fails open.

The IfExists suffix covers this. AWS gives a block that joins IpAddressIfExists on aws:SourceIp with StringEqualsIfExists on aws:SourceVpc: if either key is missing, the condition still returns true, and the value is checked only when the key is present.

Set operators belong only to multivalued keys

Some keys carry several values, such as aws:TagKeys and aws:PrincipalOrgPaths. To compare a request with multiple values you must use ForAllValues or ForAnyValue, and AWS says not to use them with single-valued keys. ForAnyValue on aws:TagKeys is case sensitive, which AWS notes stops users from using a different case of a tag key to bypass the policy.

Ten keys do not accept wildcards at all

AWS marks certain keys as sensitive, because a wildcard in them has no valid use and could match any value: aws:PrincipalAccount, aws:PrincipalOrgID, aws:ResourceAccount, aws:ResourceOrgID, aws:SourceAccount, aws:SourceOrgID, aws:SourceVpc, aws:SourceVpce, aws:VpceAccount and aws:VpceOrgID. A star in any of them turns a guard into a match for everything.

New keys keep arriving, so lists carry dates

The IAM document history records three recent additions. On 28 Aug 2025 IAM added aws:VpceAccount, aws:VpceOrgID and aws:VpceOrgPaths for network perimeter controls. On 4 Sep 2025 it added iam:ServiceSpecificCredentialAgeDays and iam:ServiceSpecificCredentialServiceName. On 10 Sep 2026 Amazon ECS extended ecs:task-cpu and ecs:task-memory to the RunTask and StartTask APIs. On 21 Oct 2026 AWS added every aws: global key to its machine-readable service reference. See IAM wildcards for how stars behave in actions and resources.

Sources

  1. AWS global condition context keys, read 16 Nov 2026
  2. IAM JSON policy elements: Condition operators, read 16 Nov 2026
  3. AWS Policy Generator configuration (policies.js), read 16 Nov 2026
  4. Document history for IAM, read 16 Nov 2026
  5. Amazon ECS expands IAM condition key support, read 16 Nov 2026
  6. AWS Service Reference Information update, read 16 Nov 2026

Last reviewed 16 Nov 2026.