Back to all operators

NumericGreaterThanIfExists

NumericGreaterThanIfExists

compares a number in a request to a number in your policy.

To match a request, the context key can be absent, but if present it must match the number in your policy.

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

NumericGreaterThanIfExists in an Allow Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: null✓ Allowed Assuming no explicit Deny elsewhere
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 101✓ Allowed Assuming no explicit Deny elsewhere
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 100− Not Allowed Statement does not apply
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 99− Not Allowed Statement does not apply

NumericGreaterThanIfExists in a Deny Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: null✕ Denied
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 101✕ Denied
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 100− Not Denied May be allowed by another statement
"NumericGreaterThanIfExists": {
"s3:max-keys": "100"
}
s3:max-keys: 99− Not Denied May be allowed by another statement