AWS Auto Scaling Groups: A Fundamental Mistake (Beginner Edition)

The Mistake

It was 5 AM. I was tired, a bit overconfident, and really wanted to see my ASG + ALB setup in action. So I skipped a pretty important step – testing the EC2 Launch Template, and jumped straight into building the full infrastructure.

Once everything was up, I opened the ALB’s DNS URL… and saw a blank page.

After some digging, I realized: the EC2 Launch Template I used didn’t have my server. It was empty. That’s when I learned that launch templates don’t store your file system. If you want your server to work, you need to create a proper AMI or add user data to install everything during boot.

The Story

I was learning about AWS Auto Scaling Groups (ASGs). I already had a decent understanding of VPCs, subnets, route tables, IGWs, and NAT Gateways. I’d also played around with Application Load Balancers (ALBs) in a small project that used three EC2 instances.

So I thought – why not combine it all? I decided to build a mini project using both ASGs and ALBs to create a scalable infrastructure setup.

Here’s what I did:

  • Created a new custom VPC for the project
  • Set up 3 public subnets and 3 private subnets, each in a different Availability Zone for high availability
  • Attached an Internet Gateway (IGW) to the VPC and linked it to the public subnets via route tables
  • Created 3 separate NAT Gateways (one in each public subnet) and connected them to the private subnets in the same AZ — because my EC2 instances were in the private subnets, and they also needed egress internet access for downloading packages, configuration files, etc.
  • Created a Target Group for EC2 instances, set it to listen on port 8080
  • Deployed an Application Load Balancer (ALB) in the public subnets and attached it to the target group
  • Made an EC2 Launch Template from an existing instance where I had already set up my server (or so I thought)
  • Created an Auto Scaling Group (ASG) using that launch template and connected it to the target group
  • Set up Security Groups for the ALB, Bastion Host, and EC2 instances accordingly

All done. Everything looked solid. I opened the ALB DNS in my browser… and it just didn’t work.

I checked security groups, route tables, load balancer health checks – everything looked fine.

Confused, I launched a bastion host and SSH’ed into one of the EC2 instances. And then… surprise: it was completely blank. No app. No server. Nothing.

That’s when I realized: Launch Templates don’t include your app or server files. They only store instance config. If you want a working server, you either need to create an AMI or provide user data.

What I Learned

At that point, I was exhausted and just shut everything down. I’ll redo it properly with AMIs next time – and I’ll test things step by step.

But honestly, I’m glad this happened. These small failures during the learning phase help you understand the “why” behind things. Now I’ll never forget how EC2 bootstrapping really works.

Thanks for reading!

If you’re also figuring out AWS like me, feel free to connect on LinkedIn. Let’s learn together! 😊

Similar Posts