Create a Linux VPC

Creating a VPC for Your Linux Instance

ℹ️ 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.

Step-by-Step VPC Creation Process

  1. Navigate to the AWS Management Console

    • In the search bar, type VPC
    • Select VPC from the services list

    Navigate to VPC service

  2. In the Your VPCs dashboard:

    • Click Create VPC button

    Access VPC creation

  3. Configure your new VPC:

    • Select VPC and more option (creates VPC with subnets, route tables, and gateways)
    • Under Name tag auto-generation, enter Linux as the prefix
    • Number of Availability Zones (AZs): select 2.
    • Number of public subnets: select 2.
    • Number of private subnets: select 2.

    Configure VPC settings

    Configure VPC settings

  4. For VPC endpoints:

    • Select None
    • Click Create VPC to initiate the creation process

    Complete VPC configuration

  5. Once creation is complete:

    • Click View VPC to examine your new VPC

    View created VPC

    VPC details view

  6. Configure subnet settings:

    • In the navigation pane, select Subnets

    Navigate to subnets

  7. Enable public IP addressing for the public subnet:

    • Select the Public subnet
    • Click Actions
    • Select Edit subnet settings

    Edit subnet settings

  8. Configure auto-assign IP settings:

    • Check Enable auto-assign public IPv4 address
    • Click Save

    Enable public IP addressing

  9. Verify your configuration:

    • Confirm that the public subnet has been successfully configured

    Successful subnet 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.

  1. Similarly, apply the same configuration to the remaining public subnets.

⚠️ 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.