How to Create Elastic IPs on Amazon Web Service(AWS).

An Elastic IP address is a reserved public IP address that you can assign to any EC2 instance in a particular region, until you choose to release it.

The Elastic IP address remains in place through events that normally cause the address to change, such as stopping or restarting the instance.By using an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.


  • Login to aws portal.
  • Click on Services.


Fig 1


  • Under Compute select EC2.


Fig 2


  • Click on Elastic IPs.


Fig. 3


  • Click on Allocate new address.


Fig. 4


  • Select Availability zone/Network Border group.
  • Select Amazon pool when an IPv4 address to be allocated from Amazon’s pool of IP addresses or Select Owned by me when an IPv4 address to be allocated from a pool created from your on-premises network.
  • Click on Allocate.



Fig. 5


  • New allocate address is ready.


Fig. 6


  • Click on Actions.
  • Select Associate Address.


Fig. 7


  • We can associate address by using two resource type.
  • When select Instance.
  • Select Existing Instance ID.
  • No need to provide private IP.
  • Click on Associate.


Fig. 8


  • When select Network interface.
  • Select existing Network interface.
  • Click on Associate.


Fig. 8


  • Associate address request succeeded.
  • Click on close.


Fig 9


  • Go to Elastic IP console page.
  • Elastic IP association is ready.
  • Click on Actions.


Fig 10


  • Click on Add/Edit Tags.


Fig 11


  • Click on Create Tag.
  • Provide key name & value for elastic IP.


Fig 12



Create Elastic IPs using Shell

aws ec2 allocate-address –domain vpc –network-border-group us-east-1


Associate Elastic IP using Instance Resource type

  • To associate an Elastic IP addresses in EC2-Classic.

         aws ec2 associate-address –instance-id instance_id –public-ip public_ip_address

  • To associate an Elastic IP address in EC2-VPC.

         aws ec2 associate-address –instance-id instance_id –allocation-id allocation_id


Associate Elastic IP using Network Interface Resource type

  • Associates an Elastic IP address with a network interface.

aws ec2 associate-address –allocation-id allocation_id –network-interface-id network_interface_id


  • Associates an Elastic IP address with a network interface & Private IP address.

 aws ec2 associate-address –allocation-id allocation_id –network-interface-id network_interface_id –private-ip-address private_id_address

Leave a Reply