Skip to content

Supported Condition operators and keys in Bucket Policies

Condition operators are categorized as follows:

  • String
  • Numeric
  • Boolean
  • IP address
  • Null check
StringEqualsCompares a key to a string value based on exact matching (case sensitive).
StringNotEqualsCompares a key to a string value based on negated matching (case sensitive).
StringEqualsIgnoreCaseCompares a key to a string value based on exact matching (ignores case).
StringNotEqualsIgnoreCaseCompares a key to a string value based on negated matching (ignores case).
StringLikeCompares a key to a string value based on exact matching (case sensitive). Can include * and? wildcard characters.
StringNotLikeCompares a key to a string value based on negated matching (case sensitive). Can include * and? wildcard characters.
NumericEqualsCompares a key to a numeric value based on exact matching.
NumericNotEqualsCompares a key to a numeric value based on negated matching.
NumericGreaterThanCompares a key to a numeric value based on greater than matching.
NumericGreaterThanEqualsCompares a key to a numeric value based on greater than or equals matching.
NumericLessThanCompares a key to a numeric value based on less than matching.
NumericLessThanEqualsCompares a key to a numeric value based on less than or equals matching.
BoolCompares a key to a Boolean value based on true or false matching.
IpAddressCompares a key to an IP address or range of IP addresses.
NotIpAddressCompares a key to an IP address or range of IP addresses based on negated matching.
NullChecks if a condition key is present in the current request context.
CategoryApplicable condition keysDescription
IP operatorsaws:SourceIpWill compare to the IP address from which the request was sent. Can be used for bucket or object operations.
Resource/Identityaws:usernameWill compare to the sender’s username from which the request was sent. Can be used for bucket or object operations.
S3:ListBucketandS3:ListBucketVersions permissionss3:delimiters3:max-keyss3:prefixWill compare to the delimiter parameter specified in a GET Bucket or GET Bucket Object versions request.Will compare to the max-keys parameter specified in a GET Bucket or GET Bucket Object versions request.Will compare to the prefix parameter specified in a GET Bucket or GET Bucket Object versions request.