Processing Uploads
In this lesson, you will learn about the different options available to process your uploads.
We'll cover the following...
This chapter explains how to trigger Lambda functions after platform events such as file uploads to S3. You will also learn about the difference between synchronous and asynchronous Lambda invocations.
The stack you deployed in the previous chapter lets users upload files quickly and easily, but the application does not do anything with those files. You have several options for how to process the uploads.
Handling conversions synchronously #
The first option would be to create an API endpoint backed by a Lambda function that synchronously converts image files into thumbnails. It could send the outputs back to users directly or save the output to S3 and redirect users to the location of the result. The advantage of this option is that it would be very simple.
The issue of large files #
The major disadvantage is that it would not work for large files. API Gateway will stop requests that take longer than 29 seconds. Lambda functions can ...