Amazon S3 folder open to public with bucket policy

Spread the love

When upload file to S3, files are not allowed to open to public.
We need to make policy to open public.

There’s Bucket Policy on permission tab.
Add policy with Json format like following:

{
    "Version": "2012-10-17",
    "Id": "AWS-some-name-of-id",
    "Statement": [
        {
            "Sid": "AWS-some-name-of-id",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::arn-url-get-from-above/*"
        }
    ]
}

We need to keep Version date, it’s not today’s date, but it is Amazon policy version date.
Also Resource ARN code could get from above the policy editor.

Facebook Comments

Published by

Titus Choi

I love technology. Working for information technology. Interested in AVR technology. Playing with RC stuff.