Reputation: 35
I'm working on an application and we'd like to host our users' files to AWS S3.
Initial thinking is to create a new bucket for every new user (bucket name could be the user's unique code). How can we control access to the user's bucket files using for example his username or email ? S3 provides different levels of access based on a AWS accounts.
We need to make sure that the authenticated user have access to only his bucket files. What would be the best way to achieve this kind of scenario (with S3 or a similar service) and prevent anyone with the right url to access other users files ?
Upvotes: 3
Views: 406
Reputation: 2475
It sounds as though what you're looking to do can be done with S3 pre-signed urls.
This would require you to:
private
, which will prevent anyone with "the right url" from accessing the files.Instead of directing your user directly to the file being requested the workflow would be something like the following:
Upvotes: 4