Auto Scaling on SQS Queue Depth
Build an event-driven auto-scaling pipeline where a Lambda producer floods an SQS queue and CloudWatch alarms scale EC2 workers up and down automatically.

Lab Overview
Build a complete event-driven scaling pipeline on AWS. A Lambda function produces messages into an SQS queue, EC2 workers in an Auto Scaling Group consume them, and CloudWatch alarms drive step scaling policies to add or remove instances based on queue depth.
You'll learn to:
- Create an SQS standard queue and inspect its metrics
- Package and deploy a Python Lambda function with an IAM execution role
- Build a VPC with a public subnet for an Auto Scaling Group
- Write a launch template with user-data that installs an SQS consumer
- Configure CloudWatch alarms on ApproximateNumberOfMessagesVisible
- Create step scaling policies for scale-out and scale-in
- Observe the full cycle: queue flood, alarm, scale-out, drain, scale-in
Key Resources:
What You'll Learn
Create and configure an SQS standard queue
Deploy a Lambda function with a custom IAM execution role
Build a VPC, launch template, and Auto Scaling Group
Configure CloudWatch alarms based on SQS queue metrics
Implement step scaling policies for automatic scale-out and scale-in
Observe the full event-driven scaling lifecycle
Prerequisites
Basic AWS CLI familiarity
Understanding of EC2 instances and security groups
Familiarity with IAM roles and policies
Technologies Covered
Part of a Course
This lab is part of the AWS Solutions Architect Associate (SAA-C03) course
View All CoursesChoose your plan
Simple, Transparent Pricing
Unlock full access to TeKanAid courses, labs, and bootcamps
Pro
All courses, with lab scripts to run on your own machine
Renews automatically. Cancel anytime.
Final price verified at checkout.
- Full access to all courses
- Lab scripts to download and run on your own machine (hosted labs not included)
- Progress tracking
- Certificate of completion
- Community access
- Self-paced bootcamps
- Premium puzzle library not included (5 free puzzles available)
- New content access
Premium
Full access, including unlimited hosted labs
Renews automatically. Cancel anytime.
Final price verified at checkout.
- Everything in Pro
- Unlimited hands-on labs, fully hosted on TeKanAid Academy (nothing to set up)
- Full access to the puzzle library
- Lab AI Assistant
- Priority support
Prefer a single course?
Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.
Browse CoursesJust exploring? Start free, no account needed
Three free ways to start. All bridge into the paid Premium catalog when you're ready.
Not ready to commit? The crash course is email-only. No academy account required.
Ready to Get Started?
Start this hands-on lab and build real-world Platform Engineering skills
Get Access Now