简体   繁体   中英

AWS S3 and CloudFront Restrict Bucket Access

How do you restrict bucket access of an endpoint?

Here's my password protected CloudFront page: d2hyhnit1e4g1k.cloudfront.net where the protection is created through a Lambda function.

I want to restrict access to my endpoint so I can't access the endpoint through http://data-flood.s3-website-us-east-1.amazonaws.com only through CloudFront.

It's easy: Simply do not grant public access to the bucket.

By default, Amazon S3 buckets are private. Therefore, nobody should be able to access the bucket.

But, you ask, how can CloudFront access the bucket to serve content? The answer is Restricting Access to Amazon S3 Content by Using an Origin Access Identity - Amazon CloudFront . That way, CloudFront can access the bucket, but nobody else can access it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM