π οΈ Lab 4 β Serverless Image Resizer
π οΈ Lab 4 β Serverless Image Resizer
Type: Build-on-your-own Time: ~75 minutes Difficulty: Intermediate Cost: Free (Lambda + S3 free tier)
π― What youβll build
Drop an image into an S3 bucket and watch a Lambda function automatically resize it into a thumbnail. No servers, no SSH, no Nginx. This is what serverless really feels like.
π Prerequisites
- Comfortable with the AWS Console
- Basic Python (youβll edit a Lambda function β provided starter code)
- An IAM user (not just root) for cleaner permission management
π οΈ AWS Services used
- S3 β image storage + event trigger
- Lambda β Python runtime that handles the resize logic
- CloudWatch Logs β for debugging
- IAM Roles β Lambdaβs execution permissions
- Pillow Lambda Layer β Python image library, attached as a layer
π The full walkthrough
Open Week2_Lab4_Lambda_Resizer.html in your browser. Itβs a complete step-by-step guide with screenshots, code snippets, and inline hints.
π‘ The HTML file is self-contained β no install, no internet needed once youβve cloned the repo. Just double-click to open in your browser.
π If you get stuck
- Re-read the relevant step in the HTML walkthrough
- Check the Common Mistakes callouts (red boxes in the walkthrough)
- Expand the π‘ Hint sections for guidance
- WhatsApp the group with a screenshot of the error
- Tag your post with
#week2done
π Submission
- Screenshot of an original image + the resized thumbnail in S3 (side by side)
- Screenshot of your CloudWatch Logs showing the Lambda invocation
β¬ οΈ Back to Week 2