403 error when trying to list S3 objects (

0

I'm following instructions here: https://docs.amplify.aws/javascript/build-a-backend/storage/list/ For uploading a file into S3 (a few list items above that) it works fine, and completes. Following the linked instructions for list fails with a 403 error. I can't figure out why that is. I basically created a vanilla Amplify project, added storage according to defaults. I even removed the "block all public access" from the bucket, but I still get the 403 error. What am I missing, this feels like it should be an easy one. attachImage works fine, getS3Files does not

Thanks!

Jason
preguntada hace 3 meses134 visualizaciones
1 Respuesta
3
Respuesta aceptada

A 403 error when listing S3 contents typically indicates a permissions problem. Could you check that the IAM roles have the s3:ListBucket permission and that the bucket policy is correctly configured? It might be necessary to adjust these to resolve the issue.

profile picture
EXPERTO
respondido hace 3 meses
profile picture
EXPERTO
revisado hace 2 meses
  • Additionally check the bucket policy as well if there are any restrictions in terms of specific actions

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