Public access downloading from bucket

0

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.

afody
已提問 2 年前檢視次數 2381 次
1 個回答
1
已接受的答案

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/

Ed
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南