is there a way to configure aws s3 rails as public?

It has to do with your AWS settings, not Rails.

When creating a bucket, UNTICK “block all public access”:

enter image description here

See the difference of a public and a private bucket in the dashboard: enter image description here

For adding a policy: enter image description here

it can be something like

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicRead",
            "Effect": "Allow",
            "Principal": "",
            "Action": [
                "s3:GetObject",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::awsexamplebucket1/"
            ]
        }
    ]
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top