☁️ AWS
EC2 with Two IPs

Updated at 2015-01-16 11:22

This checklist guides how to create a single EC2 instance with two public IPs.

  1. Create VPC e.g. with CIDR
  2. Create subnet e.g. with CIRD
  3. Create route table.
  4. Create Internet gateway.
  5. Attach Internet gateway to the VPC.
    Big blue button in Internet Gateway-page.
  6. Set route table to associate to the subnet.
    Subnet Associations-tab in Route Table-settings.
  7. Set route table to route to the created Internet gateway.
    Routes-tab in Route Table-settings.
  8. Create EC2 instance.
    1. Amazon Linux AMI 2014.09.1 (HVM)
    2. Select your new VPC as the network.
    3. Select your subnet as the subnet.
    4. Make sure that network interface has primary and secondary IP addresses.
      Don't create 2 network interfaces, but use 2 IPs.
      IP addresse can be automatic.
    5. Create a security group with SSH access from anywhere.
  9. Associate the new instance with 2 elastic IP, one for both IPs created.
  10. Try to connect to both elastic IPs using a SSH client.