Need Help in connecting S3 bucket with cloudfront

0

I connect my s3 bucket with cloudfront to reduce cost but still users are accessing data from s3. Plz hep solve this issue. I am not a technical person so plz help. Thanks

2 Answers
1

To ensure users access your S3 data through CloudFront instead of directly from S3, you need to take a few steps:

  1. Set up Origin Access Control (OAC) for your CloudFront distribution. This allows CloudFront to securely access your S3 bucket.

  2. Update your S3 bucket policy to only allow access from your CloudFront distribution. This prevents direct public access to your S3 objects.

  3. In your S3 bucket settings, enable the "Block all public access" option. This further restricts direct access to your S3 content.

  4. Provide users with the CloudFront URL to access your content instead of the S3 URL. The CloudFront URL typically looks like "d111111abcdef8.cloudfront.net/your-file-path".

  5. If you're using a custom domain, make sure it's properly set up to point to your CloudFront distribution.

By implementing these steps, you'll ensure that users can only access your S3 content through CloudFront, helping to reduce your data transfer costs. If you're not comfortable making these changes yourself, consider seeking assistance from an AWS professional or your IT department.
Sources
How to access the (cloudfront) s3 objects without pre-signed url | AWS re:Post
Cloudfront OAC S3: Public Reads & Only Signed Secure Writes | AWS re:Post
Amazon S3 origins with CloudFront - Secure Content Delivery with Amazon CloudFront

profile picture
answered 23 days ago
profile picture
EXPERT
reviewed 22 days ago
profile picture
EXPERT
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions