Generate Presigned URLs to Provide Temporary Access for Files on AWS S3 using NodeJS Backend

preview_player
Показать описание
Today we're gonna learn how to provide temporary access to files using AWS S3 Presigned URLs.

00:00 Intro
00:27 Why AWS S3 Presigned URLs.
01:21 Recap of the previous video
02:55 Create a function to generate Presigned URL
08:00 Create a controller function
11:05 Testing
13:35 Outro

When you normally upload a file to AWS S3 bucket, it's private by default. Which means users just cannot access that particular file with a public URL. You can of course define a policy and make the entire AWS S3 bucket public, which is not recommended at all.

So, this is where AWS S3 Presigned URLs come in handy. Presigned URLs are kinda special URLs that allow temporary access to a specific object on AWS S3 bucket. The URL contains authentication information in a query string in the URL. So, anyone who has the URL can access that file for a limited period of time.

So, in this project, we have a NodeJS backend (REST API) written with TypeScript. We're gonna generate Presigned URL for AWS S3 bucket using aws-sdk.

#aws #s3 #amazonwebservices

How to Upload Files to AWS S3 Bucket using NodeJS Backend:

JavaScript Callback functions explained:

JavaScript Promises explained:

Hit Subscribe and smash the Like button.

Become a Patreon and support me!

Рекомендации по теме