- Click Upload from button
- Click Upload button
- Then select the downloaded source code file
- Click Save
- Next, add environment variables to adjust the width and height of the image
- Click Configuration tab
- Click Environment variables on the left menu
- Click Edit
- Click Add environment variable, then add the following environment variables:
- WIDTH: enter the new width of the photo, such as 200px.
- HEIGHT: enter the new hight of the photo, such as 280px.
- DES_BUCKET: S3 bucket name to store the changed image, book-image-resize-store.
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.