I am currently working on Amplify Storage and how to setup authorization for S3. In DynamoDB I can easily restrict the access to specific entities or fields by using the @auth command. Unfortunately, I found out that it is not that easy for S3.
My use case:
The App is having an organizational structure. Meaning a user is part of an organization and inside of Cognito Custom Claims each user is having an organizationID custom attribute. In S3 I want all users of an organization to have access to a bucket for the corresponding organization e.g.:
S3://documents/{organizationID}/{fileName}
During my research I came accross Presigned URLs, but I am not sure if this is the way to go with Amplify.
I also came across this github issue which is unfortunately closed while not answered even though it is referenced in the amplify docs (second link at the bottom). Maybe a <@&705906736388898918> can reopen this issue:
https://github.com/aws-amplify/amplify-cli/issues/5652
https://docs.amplify.aws/lib/storage/download/q/platform/js/#file-access-levels
Looking forward to some help and somebody with a similar use case!