DEV Community

Cover image for Day 10.Attach Elastic IP to EC2 Instance
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

Day 10.Attach Elastic IP to EC2 Instance

Lab Information

The Nautilus DevOps team has been creating a couple of services on AWS cloud. They have been breaking down the migration into smaller tasks, allowing for better control, risk mitigation, and optimization of resources throughout the migration process. Recently they came up with requirements mentioned below.

There is an instance named devops-ec2 and an elastic-ip named devops-ec2-eip in us-east-1 region. Attach the devops-ec2-eip elastic-ip to the devops-ec2 instance.

Lab Solutions

Step-by-Step Instructions (AWS Console)

  1. Log in

Use the provided console URL and credentials.
Ensure region = us-east-1.

  1. Identify the Elastic IP

Open AWS console → search EC2 → open it.

In the left menu, navigate to Network & Security → Elastic IPs.

Locate the Elastic IP with Name = devops-ec2-eip.

Note the Allocation ID (you do not need it, but AWS will use it internally).

  1. Associate the Elastic IP

Select the row for devops-ec2-eip.

Click Actions.

Select Associate Elastic IP address.

A configuration window will appear.

  1. Choose the Instance to Attach

Under “Resource type”:

Choose Instance

Then select:

Instance: devops-ec2

Private IP: (choose the default one shown, usually something like 172.31.x.x)

Then click Associate.

AWS will bind the Elastic IP to the selected instance.


Resources & Next Steps


Credits

  • All labs are from: KodeKloud
  • Thanks for providing them.

Top comments (0)