Interview Prep/AWS/EC2, Auto Scaling and Load Balancing

What are the components of an Auto Scaling group?

BeginnerConceptEC2, Auto Scaling and Load Balancing
Answer

An ASG needs a launch template (AMI, type, SGs, IAM profile, user data), subnets across AZs, and min / desired / max capacity. Optionally add a load balancer target group, health checks, scaling policies, lifecycle hooks and a mixed-instances policy for On-Demand/Spot blends.

aws autoscaling create-auto-scaling-group --auto-scaling-group-name web \
  --launch-template LaunchTemplateName=web,Version='$Latest' \
  --min-size 2 --max-size 10 --vpc-zone-identifier "subnet-a,subnet-b" \
  --target-group-arns $TG_ARN --health-check-type ELB --health-check-grace-period 120
aws All AWS questions Roadmap: AWS core services

More on EC2, Auto Scaling and Load Balancing