Every AWS IAM condition operator, explained

AWS IAM has 27 core condition operators. Add modifiers like ForAllValues, ForAnyValue, and IfExists, and things get tricky fast. Here is the complete breakdown of how every single operator behaves, and exactly when to use each.

Browse the operators
All
ARN
Binary value
Boolean
Datetime
IP address
Key
Number
String
All modifiers
Base
IfExists
ForAllValues
ForAnyValue
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

All operators

67 operators

ForAnyValue:StringNotLikeIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringNotLike

String

Compares a list of strings in a request to a list of strings in your policy

StringNotLike

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringNotLike

String

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:StringNotEqualsIgnoreCaseIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

StringNotLikeIfExists

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringNotEqualsIgnoreCase

String

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringNotLikeIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringNotEqualsIgnoreCaseIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringNotEqualsIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringNotEquals

String

Compares a list of strings in a request to a list of strings in your policy

StringNotEqualsIfExists

String

Compares a string in a request to a list of strings in your policy

ForAllValues:StringNotEqualsIgnoreCase

String

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:StringLikeIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:StringNotEquals

String

Compares a list of strings in a request to a list of strings in your policy

StringNotEqualsIgnoreCase

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringNotEqualsIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

StringNotEquals

String

Compares a string in a request to a list of strings in your policy

StringNotEqualsIgnoreCaseIfExists

String

Compares a string in a request to a list of strings in your policy

ForAllValues:StringEqualsIgnoreCaseIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

StringEqualsIgnoreCaseIfExists

String

Compares a string in a request to a list of strings in your policy

StringLike

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringEqualsIgnoreCaseIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringLike

String

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:StringLike

String

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringLikeIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringEqualsIgnoreCase

String

Compares a list of strings in a request to a list of strings in your policy

StringLikeIfExists

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringEqualsIgnoreCase

String

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringEquals

String

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:StringEqualsIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAllValues:NumericNotEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

StringEqualsIgnoreCase

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:StringEquals

String

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:NumericNotEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

StringEqualsIfExists

String

Compares a string in a request to a list of strings in your policy

StringEquals

String

Compares a string in a request to a list of strings in your policy

ForAnyValue:NumericNotEquals

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

ForAnyValue:StringEqualsIfExists

String
Discouraged

Compares a list of strings in a request to a list of strings in your policy

ForAnyValue:NumericLessThanIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericNotEquals

Number

Compares a number in a request to a list of numbers in your policy

NumericNotEqualsIfExists

Number

Compares a number in a request to a list of numbers in your policy

NumericLessThanEqualsIfExists

Number

Compares a number in a request to a number in your policy

ForAnyValue:NumericLessThanEquals

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAllValues:NumericNotEquals

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

ForAnyValue:NumericLessThanEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAllValues:NumericLessThanEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericLessThanEquals

Number

Compares a number in a request to a number in your policy

ForAllValues:NumericLessThanEquals

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericLessThan

Number

Compares a number in a request to a number in your policy

ForAnyValue:NumericLessThan

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAllValues:NumericLessThanIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAllValues:NumericGreaterThanEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAllValues:NumericGreaterThanEquals

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericLessThanIfExists

Number

Compares a number in a request to a number in your policy

ForAllValues:NumericLessThan

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAnyValue:NumericGreaterThanEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericGreaterThanEqualsIfExists

Number

Compares a number in a request to a number in your policy

ForAnyValue:NumericGreaterThanEquals

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericGreaterThan

Number

Compares a number in a request to a number in your policy

ForAnyValue:NumericGreaterThan

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericGreaterThanEquals

Number

Compares a number in a request to a number in your policy

ForAllValues:NumericGreaterThanIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAnyValue:NumericGreaterThanIfExists

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

ForAnyValue:NumericEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

ForAllValues:NumericGreaterThan

Number
Discouraged

Compares a list of numbers in a request to a number in your policy

NumericGreaterThanIfExists

Number

Compares a number in a request to a number in your policy

ForAllValues:NumericEqualsIfExists

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

ForAnyValue:NumericEquals

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

Null

Key

Checks if a context key is absent in the request

ForAllValues:NotIpAddressIfExists

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAnyValue:NotIpAddressIfExists

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

NumericEquals

Number

Compares a number in a request to a list of numbers in your policy

ForAnyValue:NotIpAddress

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAnyValue:Null

Key
Discouraged

Technically valid, but the behavior is undefined — never use it

NumericEqualsIfExists

Number

Compares a number in a request to a list of numbers in your policy

ForAllValues:NumericEquals

Number
Discouraged

Compares a list of numbers in a request to a list of numbers in your policy

ForAllValues:Null

Key
Discouraged

Technically valid, but the behavior is undefined — never use it

ForAllValues:NotIpAddress

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

IpAddress

IP address

Compares an IP address in a request to a list of CIDR strings in your policy

IpAddressIfExists

IP address

Compares an IP address in a request to a list of CIDR strings in your policy

ForAllValues:IpAddress

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAllValues:IpAddressIfExists

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAnyValue:DateNotEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

NotIpAddress

IP address

Compares an IP address in a request to a list of CIDR strings in your policy

NotIpAddressIfExists

IP address

Compares an IP address in a request to a list of CIDR strings in your policy

ForAnyValue:DateNotEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

ForAnyValue:IpAddressIfExists

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAnyValue:IpAddress

IP address
Discouraged

Compares a list of IP addresses in a request to a list of CIDR strings in your policy

ForAnyValue:DateLessThanEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateLessThanEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAllValues:DateNotEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

ForAllValues:DateNotEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

DateNotEqualsIfExists

Datetime

Compares a datetime in a request to a list of datetimes in your policy

DateNotEquals

Datetime

Compares a datetime in a request to a list of datetimes in your policy

DateLessThanEquals

Datetime

Compares a datetime in a request to a datetime in your policy

DateLessThanEqualsIfExists

Datetime

Compares a datetime in a request to a datetime in your policy

ForAllValues:DateLessThanEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAllValues:DateLessThanEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAllValues:DateLessThanIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateLessThan

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAllValues:DateGreaterThanEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateGreaterThanEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAllValues:DateLessThan

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateGreaterThanEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

DateLessThanIfExists

Datetime

Compares a datetime in a request to a datetime in your policy

ForAnyValue:DateLessThanIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

DateLessThan

Datetime

Compares a datetime in a request to a datetime in your policy

ForAllValues:DateGreaterThanEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

ForAnyValue:DateGreaterThan

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

DateGreaterThanEquals

Datetime

Compares a datetime in a request to a datetime in your policy

ForAllValues:DateGreaterThanIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

DateGreaterThan

Datetime

Compares a datetime in a request to a datetime in your policy

ForAnyValue:DateGreaterThanIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

ForAnyValue:DateEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

DateGreaterThanIfExists

Datetime

Compares a datetime in a request to a datetime in your policy

DateGreaterThanEqualsIfExists

Datetime

Compares a datetime in a request to a datetime in your policy

ForAllValues:DateGreaterThan

Datetime
Discouraged

Compares a list of datetimes in a request to a datetime in your policy

DateEqualsIfExists

Datetime

Compares a datetime in a request to a list of datetimes in your policy

DateEquals

Datetime

Compares a datetime in a request to a list of datetimes in your policy

ForAnyValue:BoolIfExists

Boolean
Discouraged

Compares a list of booleans in a request to a boolean in your policy

BoolIfExists

Boolean

Compares a boolean in a request to a boolean in your policy

ForAllValues:Bool

Boolean

Compares a list of booleans in a request to a boolean in your policy

Bool

Boolean

Compares a boolean in a request to a boolean in your policy

ForAllValues:DateEquals

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

ForAnyValue:Bool

Boolean

Compares a list of booleans in a request to a boolean in your policy

ForAllValues:BoolIfExists

Boolean
Discouraged

Compares a list of booleans in a request to a boolean in your policy

ForAllValues:DateEqualsIfExists

Datetime
Discouraged

Compares a list of datetimes in a request to a list of datetimes in your policy

ForAnyValue:BinaryEquals

Binary value
Discouraged

Compares a list of binary values in a request to a list of base64-encoded string representations in your policy

ForAllValues:BinaryEqualsIfExists

Binary value
Discouraged

Compares a list of binary values in a request to a list of base64-encoded string representations in your policy

ForAnyValue:ArnNotLike

ARN

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAllValues:BinaryEquals

Binary value
Discouraged

Compares a list of binary values in a request to a list of base64-encoded string representations in your policy

BinaryEqualsIfExists

Binary value

Compares a binary value in a request to a list of base64-encoded string representations in your policy

BinaryEquals

Binary value

Compares a binary value in a request to a list of base64-encoded string representations in your policy

ForAnyValue:BinaryEqualsIfExists

Binary value
Discouraged

Compares a list of binary values in a request to a list of base64-encoded string representations in your policy

ForAllValues:ArnNotLikeIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAnyValue:ArnNotLikeIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAllValues:ArnNotLike

ARN

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAnyValue:ArnLikeIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnNotEquals

ARN
Discouraged

Compares an ARN in a request to a list of ARN patterns in your policy

ArnNotLike

ARN

Compares an ARN in a request to a list of ARN patterns in your policy

ForAnyValue:ArnNotEquals

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAnyValue:ArnNotEqualsIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAllValues:ArnNotEqualsIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnNotLikeIfExists

ARN

Compares an ARN in a request to a list of ARN patterns in your policy

ForAnyValue:ArnLike

ARN

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAllValues:ArnNotEquals

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnNotEqualsIfExists

ARN
Discouraged

Compares an ARN in a request to a list of ARN patterns in your policy

ForAllValues:ArnLike

ARN

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnLikeIfExists

ARN

Compares an ARN in a request to a list of ARN patterns in your policy

ForAllValues:ArnEqualsIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnEquals

ARN
Discouraged

Compares an ARN in a request to a list of ARN patterns in your policy

ArnLike

ARN

Compares an ARN in a request to a list of ARN patterns in your policy

ForAnyValue:ArnEqualsIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAllValues:ArnEquals

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ArnEqualsIfExists

ARN
Discouraged

Compares an ARN in a request to a list of ARN patterns in your policy

ForAllValues:ArnLikeIfExists

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

ForAnyValue:ArnEquals

ARN
Discouraged

Compares a list of ARNs in a request to a list of ARN patterns in your policy

No operators match these filters.