Madison College • Fall 2026 madisoncollege.edu

Lab 8 — AWS Lambda

← Back to Labs
Objectives
  • Create a Lambda function
  • Test a Lambda function
  • Trigger a Lambda function from external event(s)
  • Monitor and log function calls
  • Remove a Lambda function
Lab Details
  1. Create an S3 bucket named images-YOUR_NAME.
  2. Create another S3 bucket named images-YOUR_NAME-resized.
  3. Upload this picture into the first bucket. You will use this file later when you manually invoke the Lambda function.
  4. Create a new Lambda function named CreateThumbnail. The function definition can be found in this file. Change the Runtime to Python 3.14 and the Handler to lambda_function.lambda_handler.
  5. Test your function. Create a test event using the Event template “Amazon S3 Put”. Replace example-bucket with the name of your image bucket (in both places). Change "key": "test/key" to "key": "brewers_logo.jpeg". Click Create and run the test. Verify that you now have a resized image in your resized S3 bucket.

    Take a screenshot of the thumbnail image in your S3 bucket.

  6. Add a Lambda trigger. Modify your CreateThumbnail function by clicking Add Trigger. Set up an S3 trigger based on your S3 image bucket that fires for All object create events.
  7. Verify that your Lambda trigger is working. Upload a new image into your images-YOUR_NAME bucket. After the upload completes, check your images-YOUR_NAME-resized bucket to confirm a thumbnail was created.

    Take a screenshot of the new thumbnail image created by your Lambda trigger.

  8. After completing the lab and getting credit in the Grade Center, delete the Lambda and S3 resources to avoid being billed.
What did I learn?
  • Create a bucket in Amazon S3
  • Create a Lambda function
  • Testing Lambda functions
  • Lambda function triggers