Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (12.9k points)
reopened by

I'm running an ubuntu AMI on EC2. Is it possible to assign/request a new public IP address for a running EC2 instance without terminating it and starting it again? Note that I'm not interested in using the Elastic IP feature here, I just want to use the regular random public IP addresses assigned by EC2.

1 Answer

+2 votes
by (18.2k points)

When you launch an instance, it is automatically assigned a public IP address by AWS from its public IP IPv4 address pool. You cannot manually associate or dissociate a public IP from your instance. 

To change your public IP, stopping and starting an instance would be one of the easiest ways. You don't have to terminate the instance, just stop and start. Although stopping and terminating an instance is actually equivalent from the billing perspective.

Note: If you launch an instance in a non-default VPC, you can control whether your instance receives a public IP address as follows:

  • You can enable or disable public IP addressing feature during launch.
  • You can modify the public IP addressing attribute of your subnet.

Related questions

0 votes
2 answers

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

+1 vote
1 answer
asked Jan 17, 2020 in AWS by R. Raman (790 points)

Browse Categories