Search code examples
amazon-web-servicesamazon-s3permissionsbucket

Making files inside any folder in my S3 bucket public


I am new with AWS and AWS S3 and I am not managing to see the files on certain folders in my bucket through their URLs.

My node.js application is uploading some static files to my folder bucket-name/./tmp/ but I can not access them through the URL. Besides this folder, I am also using several others.

Although I already have configured my Bucket Policy according to the instructions in this question (statement bellow), I am still not managing to see files that aren't in the root folder.

My bucket policy is:

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

Is there anyway to automatically allow all the files and folders in my bucket to be public?


Solution

  • It worked properly when I started using tmp inside the root folder instead of putting it inside the . folder. (See the comments for more details)