Back to all operators
ForAllValues:StringNotEqualsIfExists
ForAllValues:StringNotEqualsIfExists
compares a list of strings in a request to a list of strings in your policy. The comparison is case sensitive.
To match a request, the context key can be absent, but if it is present, none of the strings in the request can match any string strings in your policy.
You can use policy variables in the value of this operator.
Warning
ForAllValues:StringNotEqualsIfExists is actively confusing. Any operator starting with ForAllValues ignores IfExists — it is not evaluated against the entire array, only against a single value at a time inside the ForAllValues loop. Use ForAllValues:StringNotEquals instead so your coworkers don't hate you.
ForAllValues:StringNotEqualsIfExists in an Allow Statement
Simulate in IAM Simulate| Policy Condition | Request Context | Result |
|---|---|---|
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: null | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Allowed Statement does not apply |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Allowed Statement does not apply |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | ✓ Allowed Assuming no explicit Deny elsewhere |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Allowed Statement does not apply |
ForAllValues:StringNotEqualsIfExists in a Deny Statement
Simulate in IAM Simulate| Policy Condition | Request Context | Result |
|---|---|---|
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: null | ✕ Denied |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Denied May be allowed by another statement |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Denied May be allowed by another statement |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | ✕ Denied |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | ✕ Denied |
"ForAllValues:StringNotEqualsIfExists": { | aws:TagKeys: | − Not Denied May be allowed by another statement |

