allowing public access to amazon s3 bucket

You might need to give public access to bucket contents, for example if you use the bucket to load images for your site. Simple GUI option supplied by Amazon only gives access for a specific files but if you need a whole bucket, you have to use policy.

To edit policy, in GUI go to
'Bucket => Properties => Add Bucket Policy'

And add for example (just change yourbucketname with the name of your bucket:
{
    "Version": "2011-10-24",
    "Statement": [
        {
            "Sid": "AddPerm",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::yourbucketname/*"
        }
    ]
}
save it and policy is applied.

Provided by:SiQ systems, Cloud experts

Comments

Popular posts from this blog

How to set or disable auto-logout on bash shell

How to Install Terraform 0.12 on Ubuntu 18.04

How to install PGPool II on PostgreSQL Servers in master-slave architecture + PGPoolAdmin web managment