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
preguntada hace 2 años2381 visualizaciones
1 Respuesta
1
Respuesta aceptada

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 hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas