1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
What are the public access settings for your S3 bucket?
If you want to directly expose the S3 bucket itself, you need to turn off all public access blocks.
Also, public access block settings are at the account level and S3 bucket level, so please check both.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html#configuring-block-public-access
Also, please set the bucket policy as shown below.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::s3-bucketname/*"
]
}
]
}
There is also a way to distribute using CloudFront without directly publishing S3, so please check that as well.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
Relevant content
- asked 6 months ago
- asked a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago