0% found this document useful (0 votes)
57 views4 pages

Assign Static IP to AWS EC2 Instance

This document discusses assigning an Elastic IP address to an EC2 instance to provide a static public IP address. It explains that standard EC2 instances are assigned dynamic public IPs that can change. Elastic IPs allow mapping a static IPv4 address to any instance. The steps outlined are: 1) allocate a new Elastic IP, 2) associate the IP with an EC2 instance, and 3) optionally release the IP if no longer needed to avoid charges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views4 pages

Assign Static IP to AWS EC2 Instance

This document discusses assigning an Elastic IP address to an EC2 instance to provide a static public IP address. It explains that standard EC2 instances are assigned dynamic public IPs that can change. Elastic IPs allow mapping a static IPv4 address to any instance. The steps outlined are: 1) allocate a new Elastic IP, 2) associate the IP with an EC2 instance, and 3) optionally release the IP if no longer needed to avoid charges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

EN21CS301695 SARTHAK KHANDELWAL

EXPERIMENT:9

Aim: Assigning Elastic IP Address to instance (Static IP Address)


Theory: Once you create a new EC2 Instance your instance will get
a new public IP address. But this IP address is not static so it will
change or a new IP will get assigned to your instance when certain
actions are made on your instance like restarting your instance.
If you have your public IP address configured in your DNS A record,
that particular IP address can change anytime. So, when a new IP
address is assigned to your instance your visitor cannot see your
website because it points to the old IP address which you don’t have
control anymore.
To overcome this issue Elastic IP comes in which is a static IPv4
address designed for dynamic cloud computing. With the Elastic IP
you can rapidly remap the address to any instance in your account.
Prerequisites
● A running EC2 Instance.
To allocate an Elastic IP address and assign it to an instance using
the console
1. Open the Amazon VPC console at
2. Create Elastic IP Address.
3. Choose Allocate new address.
4. Choose Allocate.
Note
If your account supports EC2-Classic, first choose VPC.
5. Select the Elastic IP address from the list, choose Actions, and then
choose Associate address.
EN21CS301695 SARTHAK KHANDELWAL

6. Choose Instance or Network interface, and then select either the


instance or network interface ID. Select the private IP address with
which to associate the Elastic IP address, and
then choose Associate.
Create Elastic IP address
Login to your AWS management console and navigate to Compute
>> EC2 and under Network and security click Elastic Ips

In this screen click Allocate Elastic IP address.


EN21CS301695 SARTHAK KHANDELWAL

Now a new IPv4 address will get allocated.

Associate Elastic IP address


Once an IP is allocated you need to associate it with the EC2 Instance.
To do so check the checkbox of your IP address and click Actions and
choose Associate Elastic IP address.
In the Resource type choose Instance and choose the instance from
the dropdown on the Instance field.
If you have any other Elastic IP address assigned before and you need
to re-associate you can enable the checkbox in Reassociation Click
Associate.
EN21CS301695 SARTHAK KHANDELWAL

Release Elastic IP address


If you wish to no longer use the allocated IP address you can release it
to prevent any unnecessary billings.
To do so check the checkbox of your IP address and click Actions
and choose Release Elastic IP address.

You might also like