How To Upload Files Directly To S3 Using ...

How To Upload Files Directly To S3 Using Presigned URLs

Aug 16, 2024

August 16, 2024   |   Read Online

 image

A client of mine this week had an issue.

Trivial perhaps for someone with experience with AWS.

But complex for someone without it.

His team had deployed a Lambda function to allow uploads to S3.

The problem was the files uploaded were always between above 20MB in size.

And Lambda has a payload limit of 6mb.

Which means you cannot upload large files to S3 with Lambda or process any payload larger than 6mb.

He kept getting "file too large" errors from Lambda.

What was the solution? He asked how long would it take me? (he had already spent a few hours).

I told him it would take me 3 minutes.

The solution is simple:

Presigned URLs.

A presigned url is a url that provides temporary access to an S3 bucket.

With it you can upload files directly to S3, circumventing the 6MB payload limit of Lambda.

In this article I explain what presigned urls are and how to use them to upload files to S3.

https://aws.plainenglish.io/how-to-upload-files-directly-to-s3-using-presigned-urls-c8d65349c2ad


Interested in learning more about cloud computing and serverless?

📬 Subscribe to my newsletter The Cloud Economist for curated content and weekly insights on saving money in the cloud.

If you'd like to support me and my journey, you can buy me a coffee :)

buymeacoffee.com/urielbitton

¿Te gusta esta publicación?

Comprar Uriel Bitton un café

Más de Uriel Bitton