Reputation: 7019
AWS JavaScript SDK has methods for listing all objects in an S3 bucket, but you have to use this method as an authenticated IAM.
Is there a way to create an IAM that can be assumed by any public user and then use that IAM to list the contents of the bucket?
Or is there any other way to list the contents of the bucket publicly using the front-end JavaScript SDK?
Upvotes: 1
Views: 1120
Reputation: 46
I know this is kind of old but I just found this: https://github.com/aws/aws-sdk-js/commit/7a8e257f32d984821a8661422070fb861659015f
It's a method for the AWS.S3() javascript sdk object, so one can make unathenticated requests to the api. Works great with public buckets.
Upvotes: 2
Reputation: 7019
I think the way to do this would be to use Amazon Cognito, which allows 'guest' access to the APIs.
Upvotes: 1