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 Resposta
1
Resposta aceita

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
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas