# IfExists operator

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

An IfExists operator is a condition operator with the suffix IfExists, such as StringEqualsIfExists. It tests the condition only when the key is present in the request and returns true when the key is missing. Without it, a missing key makes the condition false, except for negated operators, which return true.

## An example, sourced

AWS shows a condition that joins IpAddressIfExists on aws:SourceIp and StringEqualsIfExists on aws:SourceVpc: if either or both keys are not in the request context, the condition still returns true.

## Why it matters here

IfExists changes how a policy fails. In a Deny statement it can make a restriction apply to requests that lack the key; in an Allow statement it can widen access.

## Related pages

- [Service last accessed information: meaning and an example](/glossary/service-last-accessed-information/)
- [Credential report: meaning and an example](/glossary/credential-report/)
- [Service Authorization Reference: meaning and an example](/glossary/service-authorization-reference/)
- [All of them](/glossary/)

## Sources

- https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://iampolicygenerator.com/glossary/ifexists-operator/

This site is not affiliated with Amazon Web Services. AWS service and product names are used only to describe AWS services.
