ℹ️ Information: In this section, we’ll create a Virtual Private Cloud (VPC) specifically configured for hosting Linux instances. A properly configured VPC provides network isolation and security for your EC2 instances.
Navigate to the AWS Management Console

In the Your VPCs dashboard:

Configure your new VPC:
Linux as the prefix

For VPC endpoints:

Once creation is complete:


Configure subnet settings:

Enable public IP addressing for the public subnet:

Configure auto-assign IP settings:

Verify your configuration:

💡 Pro Tip: Enabling auto-assign public IPv4 addresses on your public subnet ensures that EC2 instances launched in this subnet automatically receive public IP addresses, making them accessible from the internet without additional configuration.
⚠️ Warning: While public subnets are necessary for internet-facing applications, always implement proper security groups and network ACLs to protect your instances from unauthorized access.