• Both identity-based and resource-based policies must allow access if both exist.
  • Explicit deny overrides all allows in either policy.
  • If a policy is silent on an action, it’s treated as implicit deny.??????
  • “Exists” means the policy is attached and applicable (identity or resource level).
  • Not all resources have resource-based policies by default.
  • Resource-based policies must be explicitly attached to be evaluated.
  • Some AWS services don’t support resource-based policies (e.g., EC2, RDS).
  • S3 buckets can have no resource-based policy, in which case access is controlled only by IAM (identity-based) policies.

Explicit deny always overrides any allow, and if there is no explicit allow, access is implicitly denied

ServiceSupports Resource-Based Policy?Evaluation Rule
S3✅ YesBoth identity & resource policy must allow if resource policy exists
Lambda✅ YesSame as S3: both must allow if resource policy is present
SNS/SQS✅ YesBoth must allow if resource policy is attached
KMS✅ YesBoth must allow, identity policy alone isn’t enough
EC2❌ NoOnly identity-based policy is evaluated
RDS❌ NoOnly identity-based policy is evaluated
DynamoDB❌ NoOnly identity-based policy is evaluated
IAM✅ (Trust policy, not access policy)Identity-based only for actions like CreateUser; Trust policy for AssumeRole
Secrets Manager✅ YesBoth may be evaluated; resource policy often required for cross-account access
S3 (Public)✅ YesResource-based policy can grant access without IAM, for anonymous access