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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ