Separate permission, ownership, and public exposure
How bucket policies, Object Ownership, Block Public Access, and encryption secure private repositories and destinations for logs and Firehose-delivered metric streams. · advanced
A private general purpose bucket needs several independent controls. A bucket policy grants or denies actions against resources: s3:ListBucket uses the bucket ARN, while s3:GetObject and s3:PutObject use object ARNs, usually restricted to a prefix. A prefix is a naming boundary, not a separate authorization container. An applicable explicit deny overrides an allow; cross-account access generally requires authorization from both the caller's account and the bucket's account.
S3 Object Ownership set to Bucket owner enforced disables ACLs and makes the bucket owner own uploaded objects, including cross-account uploads. Access then depends on policies, not uploader-owned ACL grants. Uploads without an ACL, or with bucket-owner-full-control, are accepted; requests specifying other ACLs fail. This setting does not itself grant a writer access.
Block Public Access is a guardrail, not a replacement for authorization. Enable all four settings at account and bucket scope for private repositories; S3 applies the most restrictive applicable combination. The settings block or ignore public ACLs and block or restrict public bucket policies. They do not prevent explicitly authorized private access, and they do not stop an attacker using credentials that already have permission.
| Control | Primary job | Does not provide |
|---|---|---|
| Bucket policy | Authorize resource access | Object ownership |
| Bucket owner enforced | Disable ACL authorization | Writer permission |
| Block Public Access | Constrain public exposure | Protection from authorized credentials |
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.