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.

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠