Testing our code

To test this, all that's needed is to upload an image to our target directory. I'll use one of my photos from the High Sierra in California, along with the AWS command-line interface. The original photo is 2,816 × 2,112 pixels:

$ aws s3 cp 1186218980_878902b096_o.jpg s3://brianz-image-resize-fanout/ --acl public-readupload: ./1186218980_878902b096_o.jpg to s3://brianz-image-resize-fanout/1186218980_878902b096_o.jpg

Let's inspect the logs from the ResizeImage function. What we expect to see is three invocations right around the same time. Bear in mind that these may finish at entirely different times since the workload between ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.