Back to all operators

ForAnyValue:NumericNotEquals

ForAnyValue:NumericNotEquals

compares a list of numbers in a request to a list of numbers in your policy.

To match a request, the context key must exist in the request and at least one number in the request must NOT match any of numbers in your policy.

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

Warning

As far as we know, ForAnyValue:NumericNotEquals can never be used — no context keys exist that are an array of numbers. 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.

ForAnyValue:NumericNotEquals in an Allow Statement

Policy ConditionRequest ContextResult
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent: null− Not Allowed Statement does not apply
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 10
 - 100
− Not Allowed Statement does not apply
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 10
✓ Allowed Assuming no explicit Deny elsewhere
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 500
✓ Allowed Assuming no explicit Deny elsewhere
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 500
 - 10
✓ Allowed Assuming no explicit Deny elsewhere

ForAnyValue:NumericNotEquals in a Deny Statement

Policy ConditionRequest ContextResult
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent: null− Not Denied May be allowed by another statement
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 10
 - 100
− Not Denied May be allowed by another statement
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 10
✕ Denied
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 500
✕ Denied
"ForAnyValue:NumericNotEquals": {
"aws:NonExistent": [
"10",
"100"
]
}
aws:NonExistent:
 - 15
 - 500
 - 10
✕ Denied