Skip to content

publicaccess to s3 bucket

0

Enter image description here
Enter image description here
Enter image description here
Enter image description here this is my entire s3 bucket

1 Answer
0

Hello.

If you access S3 directly, you must also set a bucket policy.
Try setting a bucket policy that allows "GetObject" for S3 as follows:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::your-bucket-name/*"
        }
    ]
}

By the way, if you want to use a custom domain, I recommend using CloudFront and OAC for distribution.
https://aws.amazon.com/jp/blogs/networking-and-content-delivery/amazon-cloudfront-introduces-origin-access-control-oac/

EXPERT

answered a year ago

EXPERT

reviewed a year 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.