简体   繁体   中英

S3 Access for only Cognito Authenticated User

For a small project i am developing using angular framework, i have autenticated users with access, id and refresh tokens from cognito which is used to log into the site. Now is there any way to use these tokes to grant access to uploading and downloading files from and to my s3 bucket?

Create a pre-signed URL for the get or put operation, and pass that back to the frontend which will do the actual upload or download using that url.

Here's an example from the golang docs:

https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/s3-example-presigned-urls.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM