Back to all operators

ForAllValues:BinaryEquals

ForAllValues:BinaryEquals

compares a list of binary values in a request to a list of base64-encoded string representations in your policy. There are no known binary context keys, but this is put here for completeness.

To match a request, the context key can be absent, but if it is present, all of the binary values in the request must match at least one of the base64-encoded string representations in your policy.

You can NOT use policy variables in the value of this operator.

Warning

As far as we know, ForAllValues:BinaryEquals can never be used — no context keys exist that are an array of base64-encoded string representations. It's documented here as an example of how it would work, but if you see it in the wild, it's probably a mistake.

ForAllValues:BinaryEquals in an Allow Statement

Policy ConditionRequest ContextResult
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey: null✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - c2lsbGluZXNz
 - c2hlbmFuaWdhbnM=
− Not Allowed Statement does not apply
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - c2lsbGluZXNz
− Not Allowed Statement does not apply
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - NjRAY2xvdWRjb3BpbG90Lmlv
✓ Allowed Assuming no explicit Deny elsewhere
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - NjRAY2xvdWRjb3BpbG90Lmlv
 - c2lsbGluZXNz
− Not Allowed Statement does not apply

ForAllValues:BinaryEquals in a Deny Statement

Policy ConditionRequest ContextResult
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey: null✕ Denied
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - c2lsbGluZXNz
 - c2hlbmFuaWdhbnM=
− Not Denied May be allowed by another statement
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - c2lsbGluZXNz
− Not Denied May be allowed by another statement
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
✕ Denied
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - NjRAY2xvdWRjb3BpbG90Lmlv
✕ Denied
"ForAllValues:BinaryEquals": {
"aws:BinaryKey": [
"YmFzZUBjbG91ZGNvcGlsb3QuaW8=",
"NjRAY2xvdWRjb3BpbG90Lmlv"
]
}
aws:BinaryKey:
 - YmFzZUBjbG91ZGNvcGlsb3QuaW8=
 - NjRAY2xvdWRjb3BpbG90Lmlv
 - c2lsbGluZXNz
− Not Denied May be allowed by another statement