Nicholas Lindley

We have decided to outsource image cropping to Lambda. We’ve been using Lambda to resize images into other representations we used elsewhere whenever we would put an object in an S3 bucket. The transition was pretty easy.

  1. Move cropping code into its own module.
  2. Create a Lambda function from the module.
  3. Create an SNS topic.
  4. Subscribe to function to the topic.
  5. Replace original cropping and upload code with a publish to the topic.

Doing image manipulation on somebody else’s server complicates knowing when things finish. I’ll write about that once we have a better solution.