Public access downloading from bucket
Hello, I have given public access to everyone in an S3 bucket (it's a temporal thing and the only object is a simple file). However, and when I try to download the file (using an external account for testing) with:
$ aws s3 cp --no-sign-request s3://BUCKET/OBJECT /home/ubuntu
I'm still getting the error:
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
In the permissions tab (for the bucket), it has Access: Public, Block all public access: Off, ACL Everyone (public access): List (Objects) and Read (Bucket ACL). I can list the bucket content but not make a copy. What else do I need to do to enable downloading the objects? Thanks.
Have you checked the ACL on the object itself? This will also need to be set to allow public access to anonymously download the file.
You can do this within the console using the Make Public option in the Object actions menu, or through the CLI like:
aws s3api put-object-acl --bucket BUCKET --key OBJECT --acl public-read
More info here: https://aws.amazon.com/premiumsupport/knowledge-center/read-access-objects-s3-bucket/
Relevant questions
S3 Block Public Access + Bucket Policy - Access Denied
asked 2 months agoS3 Bucket Public Access Settings
asked 3 years agoBatch download files from multiple different folders in the same S3 bucket
asked 3 months agoCan't download file from S3 bucket in another account
asked 2 years agoIs it possible to access to a public image in an KMS encrypted bucket without signature
asked 6 months agoPublic access downloading from bucket
Accepted Answerasked 2 months agoS3 pre signed url with block public access on a bucket
Accepted Answerasked 2 years agogrant access to one role in another account to all objects in an S3 bucket?
asked 9 months agoS3 Resource Owner and default Bucket/Object Privileges
Accepted Answerasked 3 years agoAccess bucket s3 from a role on another account
asked 8 months ago