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!

1 Resposta
3
Resposta aceita

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
ESPECIALISTA
respondido há 3 meses
profile picture
ESPECIALISTA
avaliado há 2 meses
  • Additionally check the bucket policy as well if there are any restrictions in terms of specific actions

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