Compute · AWS SERVICE CHEATSHEET

Auto Scaling Group (ASG)

Maintains application availability and fault tolerance by dynamically provisioning EC2 instances across multiple Availability Zones, integrating with Elastic Load Balancing target groups, and enforcing automated lifecycle termination policies.

Open Interactive ASG Sandbox → Simulate in Architecture Studio

AWS Container Placement

VPC, SUBNET

Summary

Automatically adjusts compute capacity by launching or terminating EC2 instances according to demand spikes, schedules, and health status.

When to Use (SAA-C03)

Use instead of standalone EC2 instances for production web/API tiers; set minCapacity >= 2 across 2+ AZs for high availability.

Allowed Ingress Connections & Ports

Source ServiceProtocolPortArchitectural Rationale
ALBTCP / HTTP80, 443, 8080Application Load Balancer health checks and forwarded client traffic distributed to target group members
NLBTCPAny TCP Port (e.g. 80, 443, 8443)Network Load Balancer ultra-high throughput Layer 4 passthrough traffic
WEBCLIENTTCP80, 443Direct public internet traffic if instances are provisioned in public subnets with auto-assigned public IPs
ADMINCLIENTTCP22 (SSH)Secure shell bastion host access for maintenance and debugging

Allowed Egress Targets & Ports

Target ServiceProtocolPortData Flow Rationale
RDSTCP3306 (MySQL/Aurora), 5432 (PostgreSQL)Database transactions and persistent data store queries
ELASTICACHETCP6379 (Redis), 11211 (Memcached)Sub-millisecond low latency caching layer for session state and hot data
DYNAMODBHTTPS443Direct NoSQL queries via regional endpoint or DynamoDB Gateway VPC Endpoint
S3HTTPS443Static assets, application logs, and data lake storage via S3 Gateway VPC Endpoint
NATTCP80, 443Outbound internet traffic through NAT Gateway for OS security patches, packages, and third-party APIs

Key Configuration Parameters & AWS Best Practices

ParameterFormat / ExamplePurpose & Rationale
Minimum Size (asgMin) (Required)2The lower bound on the number of running EC2 instances the group will maintain during quiet periods or scale-in events. Why: Guarantees baseline capacity and service availability even when traffic reaches near-zero levels.
Desired Capacity (asgDesired) (Required)2The target number of EC2 instances the group actively maintains under normal operating load. Why: ASG automatically provisions or terminates instances to match this target capacity unless scaled by scaling policies.
Maximum Size (asgMax) (Required)6The upper ceiling on the number of instances the ASG is permitted to scale out to during traffic surges. Why: Prevents runaway compute costs, protects downstream database connection limits, and caps blast radius during DDoS spikes.
VPC Subnets (asgSubnetIds) (Required)[subnet-us-east-1a, subnet-us-east-1b]A list of private or public subnets across 2 or more Availability Zones where ASG launches worker instances. Why: Mandatory for high availability: AWS spreads instances evenly across the specified AZs to survive single-datacenter disruptions.
Launch Template ID (launchTemplateId) (Required)lt-0123456789abcdef0:1The configuration template specifying AMI ID, instance type, key pair, security groups, block devices, and user data bootstrap script. Why: Replaces deprecated Launch Configurations; defines exact hardware and OS blueprint for all spawned instances.
Capacity Units per Instance (asgCapacityPerInstance)100Estimated request processing capacity or throughput handled per individual EC2 instance in the fleet. Why: Used by predictive scaling algorithms and CloudTracer load-testing simulation to determine when to trigger scale-out.
Target Group Attachments (targetGroupArns)[arn:aws:elasticloadbalancing:...:targetgroup/web-tg/...]Target group(s) where new EC2 instances automatically register on launch and deregister before draining. Why: Directly integrates compute elasticity with Application Load Balancer traffic routing and connection draining.
Scaling Policy Type (asgScalingPolicyType)target-trackingThe dynamic scaling policy used to automatically adjust group capacity based on live CloudWatch metrics. Why: Target Tracking policies maintain an average CPU utilization (e.g. 70%) or ALB request count per target automatically.
Target CPU Utilization (asgTargetCpuPercent)70The target average CPU utilization percentage the target tracking policy seeks to maintain across the fleet. Why: Triggers scale-out alarms when metric exceeds threshold, and scale-in when load subsides.
Health Check TypeELBDetermines whether instance health is evaluated strictly via hypervisor status checks (EC2) or includes ALB target group HTTP health checks (ELB). Why: ELB health checks ensure that instances with crashing web processes or dead ports are replaced even if the OS kernel is alive.

Practice Labs Using Auto Scaling Group

SAA-06

Streaming Media Platform: ASG Max Capacity Bottleneck

Increase ASG maximum capacity to at least 6 to absorb live traffic surges.…

SAA-08

Multi-Tier Highly Available Web Architecture: Dual-AZ ALB, ASG Fleet & Multi-AZ RDS

Re-architect for multi-AZ high availability: map the public ALB across dual AZs (us-east-1a and us-east-1b), d…

SAA-10

Non-Prod Fleet: Multi-AZ NAT & On-Demand Compute Overspend

Consolidate staging egress to a single NAT Gateway, update private route tables to route through the single NA…

Frequently Asked Questions

Where does Auto Scaling Group live inside an AWS VPC architecture?

Valid container placement: VPC, SUBNET. Maintains application availability and fault tolerance by dynamically provisioning EC2 instances across multiple Availability Zones, integrating with Elastic Load Balancing target groups, and enforcing automated lifecycle termination policies.

When should I use Auto Scaling Group on the AWS SAA-C03 exam?

Use instead of standalone EC2 instances for production web/API tiers; set minCapacity >= 2 across 2+ AZs for high availability.

Can I simulate Auto Scaling Group packet routing without an AWS account?

Yes. CloudTracer simulates Auto Scaling Group along with 53 AWS services directly in your browser and exports production Terraform HCL.

More Compute Cheatsheets

EC2 Instance → Lambda Function → ECS Fargate →