dr3x / simple-aws-upload

Uploading files on S3 for Cognito authenticated user. Demo app for an article at https://dev.to/zenika/how-to-use-aws-cognito-to-access-aws-services-150e

Home Page:https://dev.to/zenika/how-to-use-aws-cognito-to-access-aws-services-150e

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is from the tutorial at

How to use AWS Cognito to access AWS Services

File uploads with AWS Cognito and S3

This repo serves as a proof of concept to use AWS Cognito to upload files for authenticated users.

Development

Create a new file .env and copy the variables from .env.sample file. Insert your AWS credentials.

Run yarn install to install the dependecies.

Run yarn dev to start the app.

References

Policy reference - https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_s3_cognito-bucket.html

Generate presigned url - https://aws.amazon.com/blogs/developer/generate-presigned-url-modular-aws-sdk-javascript/

S3 CRUD example - https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html

SDK S3 client docs - https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/index.html

About

Uploading files on S3 for Cognito authenticated user. Demo app for an article at https://dev.to/zenika/how-to-use-aws-cognito-to-access-aws-services-150e

https://dev.to/zenika/how-to-use-aws-cognito-to-access-aws-services-150e


Languages

Language:JavaScript 64.4%Language:HCL 23.4%Language:HTML 6.2%Language:CSS 6.0%