A CloudFront distribution in the same account serves static objects using GET from a regular S3 REST origin, not an S3 website endpoint. Objects use SSE-S3 encryption.
The bucket uses Bucket owner enforced with ACLs disabled and all four Block Public Access settings enabled. There is no anonymous public Allow, and CloudFront read authorization still needs to be configured.
Keep public viewing through CloudFront while preventing anonymous direct S3 reads. Limit the bucket permission for CloudFront reads to the intended distribution.
Which configuration meets these requirements?
Attach an always-signing OAC to the S3 REST origin and use the bucket policy to restrict CloudFront reads to the specific distribution. Origin protection and viewer authorization are separate requirements.
Detailed explanation
The service principal alone does not restrict permission to a particular distribution. Use AWS:SourceArn with the intended distribution ARN to narrow the authorization.
With never, CloudFront does not sign origin requests. This scenario provides no anonymous access or alternative authentication, so merely attaching OAC does not authorize private-bucket reads.
Combine signed origin requests with object-read permission for the specific distribution. Keep Block Public Access and Bucket owner enforced without allowing anonymous direct S3 reads.
S3 website endpoints do not support OAC. Distinguish a regular S3 REST origin from a website endpoint.
Check official documentation
Compare the following points with the official documentation.
Compare official documentation with the origin type, OAC association and SigningBehavior, bucket policy Principal, Action, Resource and AWS:SourceArn, Block Public Access, and Object Ownership. In an available authorized environment verify that anonymous direct S3 GET is denied and the intended CloudFront distribution can fetch an uncached known object, comparing configuration with origin-fetch records.
Official references
- Official documentation 1
- Official documentation 2
- Official documentation 3
- Official documentation 4
- Official documentation 5
- Official documentation 6
- Official documentation 7
What to confirm
Anonymous direct S3 GET returns AccessDenied, while GET through the intended CloudFront distribution succeeds. Also verify permission scope for the required objects and distribution in configuration. A cached 200 alone does not prove origin authentication, and blanket denial of authorized IAM administration is not a requirement.
Key points
- SigningBehavior
- AWS:SourceArn
- S3 REST origin
Notes
- Environment: Official CloudFront and S3 documentation review; optional controlled reads and origin-fetch checks in an authorized environment.
- Reviewed against the linked AWS documentation on 2026-10-22.
Foundation review
Combine OAC signing with S3 authorization
Attach OAC to a regular S3 REST origin and use SigningBehavior=always to sign origin requests with SigV4. In the bucket policy, allow cloudfront.amazonaws.com to perform s3:GetObject on the required object ARNs, restricting AWS:SourceArn to the intended distribution ARN. Creating OAC alone, or using never, does not authorize reads from private S3. OAC cannot protect an S3 website endpoint configured as a custom origin.
Separate anonymous exposure from authorized administration
Keep all Block Public Access settings and Bucket owner enforced, without a policy allowing anonymous public access. Disabling ACLs does not replace the required bucket policy authorization. The goal is to prevent anonymous direct S3 reads, not to deny every legitimately authorized IAM operation. This scenario uses SSE-S3; SSE-KMS would also require appropriate KMS key policy permission.
Separate origin protection, viewer authorization, and caching
OAC protects CloudFront-to-S3 access. Signed viewer URLs or cookies restrict who can view CloudFront content, a separate boundary. Public viewing through CloudFront is intended here. A cached 200 response alone does not prove S3 access: in an authorized environment compare an uncached known object with configuration and origin-fetch records.