AWS Builder Center

Day 12 Of Cloud with AWS: Attach an Elastic IP to an EC2 Instance

#100DaysOfCloud challenge using AWS

Objective

Attach the Elastic IP:
1
devops-ec2-eip
to the EC2 instance:
1
devops-ec2
in the:
1
us-east-1
AWS region.
Step 1: Open AWS Console
  1. Log in to the AWS Management Console.
  2. Select the region:
1
us-east-1
from the top-right corner.
Step 2: Open EC2 Dashboard
  1. Search for:
1
EC2
  1. Open the EC2 service dashboard.
Step 3: Open Elastic IPs Section
  1. In the left navigation pane, scroll to:
1
Network & Security
  1. Click:
1
Elastic IPs
Step 4: Locate the Elastic IP
  1. Find the Elastic IP named:
1
devops-ec2-eip
  1. Select the checkbox next to it.
Step 5: Associate the Elastic IP
  1. Click:
1
Actions
  1. Select:
1
Associate Elastic IP address
Step 6: Select the Instance
Configure the association:
SettingValue
Resource typeInstance
Instanceinstance_id (choose from dropdown)
Private IPLeave default selected
Step 7: Associate
  1. Click:
1
Associate
AWS will now attach the Elastic IP to the EC2 instance.
What is an Elastic IP?
An Elastic IP is a static public IPv4 address provided by AWS.
Benefits:
  • Persistent public IP address
  • Remains the same after instance reboot
  • Useful for production servers and DNS mappings
  • Can be reassigned to another instance if needed
Unlike normal public IPs, Elastic IPs do not change when an instance stops and starts.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article