INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: S3: versions, retention, replication and cost

S3 ACLs vs bucket policies: ownership, permissions and public access

Access control lists (ACLs) and policies are different S3 access controls. New buckets default to Bucket owner enforced, with ACLs disabled. Use an internal report read by an application to separate ownership, permission and protection against public access.

What you will learn

Distinguish Object Ownership, identity-based policies, bucket policies, ACLs and Block Public Access; choose what to inspect without immediately relaxing public-access controls.

Prerequisite

Know IAM principals, actions and resources, and S3 buckets and objects. The example uses an application role and a general purpose bucket in the same account. No real policy or credential is needed.

Read ownership, permission and public-access protection separately

Three controls to inspect for an internal application read
Three controls to inspect for an internal application read1: Ownership — Ownership settings determine whether ACL-based grants participate. — Read permission. 2: Read permission — Review public-access restrictions alongside permission statements. This is not a network path. — Public-access protection12OwnershipRead permissionPublic-accessprotectionThree controls to inspect for an internal application read1: Ownership — Ownership settings determine whether ACL-based grants participate. — Read permission. 2: Read permission — Review public-access restrictions alongside permission statements. This is not a network path. — Public-access protection12OwnershipRead permissionPublic-accessprotection
  1. Ownership → Read permissionOwnership settings determine whether ACL-based grants participate.
  2. Read permission → Public-access protectionReview public-access restrictions alongside permission statements. This is not a network path.
Ownership
Bucket owner enforced gives ownership to the bucket owner and disables ACL-based access.
Read permission
Review the role, object permission, applicable denies and conditions.
Public-access protection
BPA restricts public ACLs/policies; it does not grant a new read permission to the application.

Ownership, permission and absence of public access are separate properties. Disabled ACLs do not mean nobody can read an object. Enabled BPA does not mean every internal application request is denied. Fix the principal, operation and target first.

Choose an option to see the result and explanation.

A new general purpose bucket uses Bucket owner enforced. What does disabling ACLs mean?
Read the answer and reason

Answer: Manage access through policies; this does not make the bucket public · Object Ownership controls ownership and ACL use. Actual reads still depend on policies and applicable restrictions.

Separate the default for new buckets from an existing configuration

The three Object Ownership settings
SettingACL and ownership behavior
Bucket owner enforcedDefault for new buckets; ACLs disabled, bucket owner owns objects
Bucket owner preferredACLs enabled; bucket owner owns new uploads carrying bucket-owner-full-control
Object writerACLs enabled; the uploading account owns its objects

A default does not prove an existing bucket has that configuration. Check older integrations before changing ownership settings. With Bucket owner enforced, requests to set or update ACLs fail, while reading an ACL remains supported.

Uploads to a Bucket owner enforced bucket accept no ACL or bucket-owner-full-control. Other requested ACLs fail with AccessControlListNotSupported. Inspect the upload request before deciding to enable ACLs.

Choose an option to see the result and explanation.

An upload requesting another ACL fails against a Bucket owner enforced bucket. What should you inspect first?
Read the answer and reason

Answer: The ACL requested by the uploader and whether it is needed · The uploader may be requesting an ACL that conflicts with the ownership configuration. Disabling BPA does not explain that mismatch and changes public-access protections.

Read policies by principal, action, resource and condition

Identify where a permission is attached
ControlWhat to inspect
Identity-based policyAttached to an IAM identity such as a role; inspect its actions, resources and conditions
Bucket policyResource-based policy attached to the bucket; inspect Principal, Action, Resource and Condition
ACLWhen enabled, grants a limited set of permissions to accounts or groups; differs from an IAM identity policy

The example is an application role making GetObject for reports/monthly.pdf. Match permissions to the object, not just the bucket, and review explicit denies, organization/session restrictions and encryption or endpoint conditions. Do not assume both identity and resource policies always need an Allow for a same-account request; analyze cross-account access separately.

Distinguish the four BPA settings by the operation they affect

Four public-access restrictions for general purpose buckets
SettingMain distinction
BlockPublicAclsRejects requests that set public ACLs, including applicable writes
IgnorePublicAclsIgnores public ACL grants during access evaluation
BlockPublicPolicyRejects new bucket/access-point policies classified as public
RestrictPublicBucketsRestricts access to buckets/access points that have public policies

Saving a public policy and reading an object are different operations. BlockPublicPolicy alone does not establish that a GetObject based on an existing policy is denied. Applicable account, bucket and access-point controls combine, and organization policy may govern account-level protection. A bucket-only view is incomplete.

Choose an option to see the result and explanation.

BlockPublicPolicy rejected saving a public policy. What has been established?
Read the answer and reason

Answer: That save request was rejected; a separate read result is not established · Separate policy configuration from GetObject evaluation. Retain public-access protection and inspect the read principal, target, existing policies and applicable restrictions.

Collect the request and evidence before changing access controls

  1. Identify the operation: upload, ACL update, policy save or GetObject.
  2. Match the principal and target: role/account, key/version and request route.
  3. Review Object Ownership, any ACL dependency, policies, denies and BPA.
  4. Choose a minimal correction tied to evidence; avoid treating disabled BPA or broad principals as universal fixes.

Check, then explain in your own words

  1. Check the actual Object Ownership setting.
  2. Fix principal, action and target.
  3. Distinguish policy and ACL roles.
  4. Match each BPA setting to the affected operation.
Check your understanding: Do disabled ACLs and enabled BPA necessarily stop an internal application from reading?

No. Evaluate the concrete request against its policies and applicable restrictions.

Ownership, permissions and public-access protection have different roles. A failed read is a reason to inspect its operation and evidence, not automatically disable protection.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.