ℹ️ 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 VPC Console:

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

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.
To enable auto-assign public IP:

In the subnet settings:

Verify the configuration was successful:

💡 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.
To create a security group for your application:

Configure the basic security group details:
FCJ-Management-SGSecurity Group for FCJ Management
Configure the inbound rules:

🔒 Security Note: In a production environment, consider restricting access to specific IP ranges rather than using “Anywhere” for enhanced security.
Review the outbound rules (default allows all outbound traffic) and click Create security group

ℹ️ Information: For database instances, we’ll create a separate security group with more restrictive access controls to enhance security.
Configure the database security group:
FCJ-Management-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.
Review the outbound rules and click Create Security Group

💡 Pro Tip: This network architecture with separate security groups for application and database tiers follows AWS Well-Architected best practices for security and isolation.