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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.