ℹ️ Information: In this section, we’ll create a Virtual Private Cloud (VPC) with public and private subnets across multiple Availability Zones to ensure high availability for our Auto Scaling architecture.
Navigate to the AWS Management Console. In the search bar, find and select VPC

In the VPC Console. Click Create VPC

In the Create VPC interface:
AutoScaling-Lab10.0.0.0/16

Finalize the VPC creation:

ℹ️ Information: For EC2 instances in public subnets to receive public IP addresses automatically, we need to enable auto-assign public IPv4 addresses.



💡 Pro tip: Repeat this process for all public subnets to ensure any EC2 instance launched in these subnets automatically receives a public IP address.
ℹ️ Information: Security Groups act as virtual firewalls for your instances to control inbound and outbound traffic.

fcaj-sgSecurity Group for FCAJ Management

🔒 Security Note: In a production environment, consider restricting access to specific IP ranges rather than using “Anywhere” for enhanced security.

ℹ️ Information: For database instances, we’ll create a separate security group with more restrictive access controls to enhance security.
Configure the database security group:
fcaj-db-sgSecurity Group for DB instanceConfigure the inbound rules:

🔒 Security Note: By referencing the application security group as the source, you ensure that only EC2 instances with that security group can access the database, following the principle of least privilege.
💡 Pro tip: This network architecture with separate security groups for application and database tiers follows AWS Well-Architected best practices for security and isolation.