Open AWS Lambda console, then click Create function button
Enter function name, such as: resize-image
Download source code file to your device
Click Upload from button Click Upload button Next, add environment variables to adjust the width and height of the image Click Add environment variable, then add the following environment variables: Then, click Save
So we have completed the step of creating a Lambda function and configuring the environment variables for it. Next step, we will create an S3 bucket to store uploaded and edited images.