Identity and resource policies
Identity policies attach permissions to principals; resource policies attach permissions to supported resources. Effective authorization depends on policy type and request context, including cross-account rules. An explicit deny overrides applicable allows. For example, a role allows s3:GetObject, but a matching bucket-policy explicit deny still prevents the read.
A role allows s3:GetObject, but a matching bucket-policy explicit deny still prevents the read.
Trace a request from an assumed role to read one object. AWS identifies the principal, action s3:GetObject, object ARN, and context such as transport and source information. Applicable identity and resource policies are evaluated according to the request's authorization rules. An explicit deny in either applicable policy can stop the request even when another statement allows it.
A principal is the requesting identity. An action names an API permission. A resource ARN identifies the target to which a statement applies. Bucket-level operations and object-level operations use different ARN shapes, so an Allow for the bucket itself does not automatically authorize reads of its objects. Cross-account access also requires suitable caller-side authorization and resource-side permission or trust. Diagnose the actual denied request instead of copying a large policy from another service. Policy evaluation is contextual: a successful read of one key does not prove permission for every key, operation, or network path.
A role allows s3:GetObject, but a matching bucket-policy explicit deny still prevents the read.
Do not overlook this operational distinction: An explicit deny overrides applicable allows.