AWS Lambda function for resize image in s3 bucket

I have CMS upload image to AWS S3. First it is uploaded to my apache server and create thumbnail, after that it uploads both the original image and the thumbnail to AWS S3. It takes long time to process, I need to create function in lambda that takes any image from S3 bucket and resize it for any size I give, that's all.

I Have tried make trigger lambda with s3 work fine, but I don't know what to do next.


The AWS Lambda documentation has a walkthrough that will automatically resize pictures.

See: Tutorial: Using AWS Lambda with Amazon S3 - AWS Lambda

The tutorial configures:

  • An AWS Lambda function
  • An Amazon S3 Event to trigger the Lambda function when a file is uploaded to an S3 bucket
  • The Lambda function will then read the image, resize it and store it in a different S3 bucket

You can modify the code to operate differently if desired.


Check below tutorial to Resize Image using Lamda function

Resize Image using Lamda function