Open In App

Allocate Elastic IP-Address to EC2 Instance in AWS

Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisite: AWS

When we launched the EC2 instance machines required IP-Address to communicate within a network or the internet. Amazon Web Services support IPv4 or IPv6 both and Amazon Web Services provide two option regarding IP-address to attach with EC2-Instance:

  1. Auto Assign IP-Address
  2. Manual Assign IP-Address  (Elastic IP-Address)

Auto Assign IP-Address:

In Auto Assign IP-Address when we launched the EC2 instance and any type of machine in AWS. By default, it is assigned the IP address to the instance but when we stop the instance the given IP Address de-allocates the IP Address. It will be available for everyone. We can not use the same IP-Address at every time that’s why we require an Elastic IP Address.

Manual Assign IP-Address (Elastic IP-Address):

Elastic IP-Address is an Amazon web services service in EC2 and it is free of cost for everyone. If we allocate the Elastic IP-Address in our AWS account but not used it with any instance then AWS will impose the charge after 1 hour. when we assign the Elastic IP-Address with our instance it does not matter if our instance is off or on we can easily work with one IP-Address until or unless we de-allocate the IP-Address.

Allocate Elastic IP-Address to the EC2 Instance: 

Step 1: Click on All services.

Step 2: Click on the EC2.

console

 

Step 3: Click on the Launch Instances.

launch instance

 

Step 4: Give the EC2 instance name or tag  -> “EC2-IP-Address” is name in my case.

instance name

 

Step 5: Choose Amazon Machine Image for your instance.

choose AMI

 

Step 6: Choose an Instance type.

Step 7: Choose the Key Pair or Create the Key pair.

instance type and key pair

 

Step 8: Click on the Create Security Group, then Click on the EDIT button.

security group

 

Step 9: Must be Disable the Auto Assign public IP.

auto assign public ip

 

Step 10: Click on the Launch Instance button.

launch instance

 

Now you can see the Public IPv4 is not assigned. Now it’s time to manually configure the IP-Address

Public IPv4 Add

 

Step 11: Scroll down and Click on the Elastic IPs.

Elastic IP

 

Step 12: Click on the Allocate Elastic IP Address.

Allocate Elastic IP

 

Elastic IP Address setting – Default setting.

 

Step 13: Click on the Allocate.

 

Step 14: Click on the IP Address, you will see the Allocated IP Address 52.66.151.107.

Step 15: Select the IP-Address -> Click on the Action, then select the Associate Elastic IP Address.

Associate Elastic IP Address

 

Associate Elastic IP Address  -> Instance – Choose an instance and Select the instance where you wants to allocate IP Address.

Step 16: Click on the Associate Button

 

 

Step 17: Go to the Instance and Select the Instance and now you can see the Public IPv4 Address 52.66.151.107.

Public IPv4 Add

 


Last Updated : 27 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads