In my previous post, Working with S3 pre-signed URLs, I showed you how and why I used pre-signed URLs.
This time I faced another problem: I had to upload a large file to S3 using pre-signed URLs. To be able to do so I had to use multipart upload, which is basically uploading a single object as a set of parts, with the advantage of parallel uploading.
In the following article, I’ll describe how I combined and used multipart upload with pre-signed URLs.
A normal multipart upload looks like this:
For that to work with pre-signed URLs, we should add one more stage: generating pre-signed URLs for each part.
The final process looks like this:
Stages 1,2, and 4 are server-side stages, which require an AWS access key id & secret, where stage number 3 is client-side.
Let’s explore each stage.
#nodejs #aws #aws-s3 #serverless #presigned-url