Security

Origin Access Control (OAC)

Lets CloudFront reach a private S3 bucket so nobody can use the bucket directly.

How it works

Origin Access Control (OAC) lets Amazon CloudFront sign requests to an origin, such as an S3 bucket, using AWS Signature Version 4. With the recommended signing setting and an appropriate bucket policy, you can allow a CloudFront distribution to read objects without granting public S3 read access. OAC controls origin access; viewer access must be designed separately.

When to use it

Serve S3 content only through CloudFront.

Real-world example

A company stores update files in a private S3 bucket and configures OAC to sign CloudFront requests. Its bucket policy allows the specified distribution to read objects, while public read access to the bucket is not granted.

Key facts

  • Used together with an S3 bucket policy.
  • The bucket stays private.

Common pitfall

Enabling OAC alone is not enough: the S3 bucket policy must also grant appropriate access to CloudFront. For SSE-KMS objects, the KMS key policy must grant CloudFront the necessary permissions too.

References

Prepared by Cloud Quest. Check current behavior and limits in the AWS documentation:

SAA-C03 study guide and learning resources

Keywords you will see in SAA-C03 questions

  • S3 only through CloudFront
  • private bucket
  • restrict direct S3 access

Understand it for real with 3D models and simulated labs

Connect the concept to a working architecture.

Start learning