Create EC2 Server

Create EC2 Instances in Subnets

  1. Access the AWS Management Console:

    • Navigate to EC2
    • Click on Instances

    Create VPC

  2. In the EC2 interface:

    • Select Instances
    • Choose Launch instances

    Create VPC

  3. Provide a Name and tags for the instance, enter EC2 Public

    Create VPC

  4. Choose the AMI:

    • Select Quick Start
    • Choose Amazon Linux 2
    • Select an AMI

    Create VPC

  5. Select an Instance type and opt to Create a new key pair

    Create VPC

  6. In the Create key pair interface:

    • Specify the Key pair name, e.g., aws-keypair (optional name, you can set any).
    • Choose Key pair type: RSA
    • Select Private key file format: .pem

    Create VPC

  7. Configure the Network:

    • Select the VPC: ASG
    • Choose the Subnet: Public Subnet 1
    • Enable Auto-assign public IP
    • For Firewall (Security Group), select Select existing security group
    • Choose Public subnet -SG
    • Click Launch instance

    Create VPC

  8. Complete the instance creation

    Create VPC

  9. Wait for about 5 minutes until the Status check shows 2/2 checks passed

    Create VPC

Create EC2 in a Private Subnet

  1. In the EC2 interface:

    • Select Instances
    • Choose Launch instances
  2. Provide a Name and tags, enter EC2 Private

Create VPC

Create VPC

  1. Choose the AMI:

    • Select Quick Start
    • Choose Amazon Linux 2
    • Select an AMI

Create VPC

  1. Make an instance type selection. Choose Key pair name: aws-keypair

Create VPC

  1. Configure the Network:

    • Select the VPC: ASG VPC
    • Choose the Subnet: Private subnet 2
    • Disable Auto-assign public IP. If not disabling it, ensure you’ve checked the configuration for automatically allocating public IP for the subnet.

Create VPC

  1. Complete the instance creation:

    • Click View all instances

Create VPC

  1. Select EC2 Private:

    • Choose Details
    • Store Private IPv4 addresses

Create VPC