TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Lab - AWS Lambda Resize Image
1. Image Resize using Lambda Function
1. Create two S3 Buckets : one as the source image bucket and the other as the destination
bucket and upload a picture to the first bucket (without -resized)
2. Create IAM Role for Lambda to have access to S3 and CloudWatch
3. Create a Lambda function from sratch, using Python 3.7 Run Time and assign execution
role we created above.
2. 4. Configure S3 Bucket as the event source/trigger for the lambda function
5. Configure the lambda function and upload the file. The Handler name should be
CreateThumnail.handler and save the function. ZIP File : https://bit.ly/lambdaresize
3. 6. Create an event template for testing
7. Test the function You will get the success logs like above. Once you get the success log, go
to the resized bucket you can see the resized image in it.
4. 8. Now try to upload another image (JPG) to the first bucket and check your –resized bucket
for the resized image (thumbnail).