-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage authorizations work for "write" but not for "list" #8236
Comments
Hey @newbie33-git, thank you for reaching out and reporting. Noticed the list api call does not have
Marking this as documentation to update the page |
@ykethan Thanks I should have caught it ... What puzzles me is that the policy attached to the auth role seems legit, so the missing $ may not have messed the path...
|
@ykethan I have just added the missing $ and it solved my problem !! What still puzzles me is that the policy posted above has not changed and still seems legit, that is quite mysterious to me ... but hey it works, thanks ! |
@newbie33-git the policy generated should not change on the role. As the client request was passing in |
@ykethan ah yes understood thanks ! |
Environment information
Describe the bug
I get this error when using the list function from 'aws-amplify/storage'
arn:aws:sts::REDACTEDACCOUNTID:assumed-role/amplify-d3su8b8ts26mem-st-amplifyAuthauthenticatedU-xrRLyt00Gu8C/CognitoIdentityCredentials is not authorized to perform: s3:ListBucket on resource: "arn:aws:s3:::amplify-d3su8b8ts26mem-st-REDACTEDBUCKETNAME760f-k0jit9xertfc" because no identity-based policy allows the s3:ListBucket action
But I am clearly authenticated as I manage to put objects in this bucket, the storage is defined as follows :
And I do have an IAM policy attached to this user with permissions PutObject and ListBucket, this policy has been created automatically by aws amplify, I am just stupidly following the docs.
Reproduction steps
Define a storage with permissions write and list
Try to list in your client code
The text was updated successfully, but these errors were encountered: