This repository contains hands-on labs demonstrating core Amazon EC2 concepts, from foundational networking and instance provisioning to high availability and automated scaling. Using LocalStack Pro, we simulate a complete AWS compute environment locally.
Based on AWS best practices (SAA-C03), these labs cover:
- Network Foundation: Provisioning custom VPCs, public/private subnets, and internet gateways.
- EC2 Provisioning: Launching On-Demand instances with optimized AMI selection.
- Security & Access: Implementing stateful Security Groups and instance-level bootstrapping via User Data.
- High Availability: Designing for fault tolerance using Multi-AZ deployments.
- Scaling & Load Balancing: Exploring Launch Templates, Auto Scaling Groups, and Elastic Load Balancers.
- Cost Optimization: Leveraging Spot Instances and Savings Plans logic.
- Docker & Docker Compose
- LocalStack Pro account and Auth Token
awslocalCLI (a wrapper around the AWS CLI for LocalStack)
-
Configure your LocalStack Auth Token in
.env:echo "YOUR_TOKEN=your_auth_token_here" > .env
-
Start LocalStack Pro:
docker-compose up -d
Important
Cumulative Architecture: These labs are designed as a cumulative scenario. You are building an evolving infrastructure.
Session Persistence: These labs rely on bash variables (like $VPC_ID, $SG_ID, $AMI_ID, etc.). Run all commands in the same terminal session to maintain context.