AccessDenied from an SCP, permissions boundary, session or VPC endpoint policy
An allowing identity policy is not enough if an SCP, RCP, permissions boundary, session policy or VPC endpoint policy denies the action. Decode the message.
What you see
... with an explicit deny in a service control policy: arn:aws:organizations::777788889999:policy/o-exampleorgid/service_control_policy/p-examplepolicyid123... because no permissions boundary allows the codedeploy:ListDeployments action... because no VPC endpoint policy allows the codecommit:ListRepositories action
What it means
AWS includes only one denying policy type in the message, even when several deny. If you fix the one named and the error changes, another layer is also denying.
A permissions boundary sets the maximum an identity can have. If the identity policy allows the action but the boundary does not, the request is denied. Resource-based policies are not limited by boundaries.
How to confirm the cause
- 1Read the policy type in the message
# "explicit deny" = a Deny statement. "no ... policy allows" = a missing Allow. The type names the layer.
Types in the docs: service control policy, resource control policy, VPC endpoint policy, permissions boundary, session policy, resource-based policy, role trust policy, identity-based policy.
- 2If a policy ARN is given, open that policy
aws iam get-policy --policy-arn POLICY_ARN
For SCPs and RCPs use AWS Organizations from the management account instead.
Causes and fixes
Service control policy
- HOW TO TELL
explicit deny in a service control policy, orno service control policy allows.- FIX
- Remove the
Denystatement, or add the missingAllow, in the SCP. This is done in AWS Organizations.
Permissions boundary
- HOW TO TELL
no permissions boundary allowsorexplicit deny in a permissions boundary.- FIX
- Update the boundary policy to allow the action, or remove the denying statement.
Session policy
- HOW TO TELL
session policyin the message.- FIX
- Fix the session policy that was passed when the credentials were created, or get credentials without that restriction.
VPC endpoint policy
- HOW TO TELL
VPC endpoint policyin the message.- FIX
- Update the endpoint policy. If the denial is not in CloudTrail, the endpoint owner account may differ from the calling account.
Role trust policy
- HOW TO TELL
sts:AssumeRolewithrole trust policyin the message.- FIX
- Allow the principal in the role's trust policy.
How to stop it coming back
- Document which SCPs and boundaries apply to each account.
- Change SCPs through review, since one edit affects every account below it.
Keep going
- Runbook: AWS "is not authorized to perform" (AccessDenied)
- Cheat sheet: AWS CLI
- Lesson: the security topic in Learn
Sources
AWS documentation (docs.aws.amazon.com), read 18 Nov 2026.