Asynchronous data processing

Lambda supports both synchronous and asynchronous invocations. The asynchronous response model lends itself well to asynchronous data-processing requests. We can issue as many requests in parallel as our soft limit for concurrent Lambda executions allows us to do (by default, up to 1,000 per region).

A good example would be an image-processing application. We mentioned such an application in Chapter 15Handling Messaging with Simple Notification Service when we talked about an image-resizing tool that would take an input from an S3 bucket and resize it to a web format, a mobile format, and a thumbnail. The processing itself can be done with a Lambda function (or three Lambda functions, one for each format), which can easily be invoked by the act of the image being uploaded to S3. As soon as the image is uploaded to the source bucket, the Lambdas pick up the original image, transform the image to the desired sizes, and then store the output to one or several S3 buckets so that the image can be displayed on the website.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.217.95