Bool

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

To match a request, the context key must exist in the request and must match the boolean in your policy.

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

Bool in an Allow Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: null− Not Allowed Statement does not apply
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: true✓ Allowed Assuming no explicit Deny elsewhere
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: false− Not Allowed Statement does not apply

Bool in a Deny Statement

Simulate in IAM Simulate
Policy ConditionRequest ContextResult
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: null− Not Denied May be allowed by another statement
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: true✕ Denied
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
aws:PrincipalIsAWSService: false− Not Denied May be allowed by another statement