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
已提问 3 个月前135 查看次数
1 回答
3
已接受的回答

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
专家
已回答 3 个月前
profile picture
专家
已审核 2 个月前
  • Additionally check the bucket policy as well if there are any restrictions in terms of specific actions

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则