403 error when trying to list S3 objects (


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


asked 2 months ago99 views
1 Answer
Accepted Answer

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
answered 2 months ago
profile picture
reviewed a month ago
  • Additionally check the bucket policy as well if there are any restrictions in terms of specific actions

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions