Search code examples
amazon-web-servicesubuntuamazon-ec2elastic-ip

Allocating an Elastic IP address to an existing / running Amazon EC2 instance


Are we able to allocate an Elastic IP address to an existing / running Amazon EC2 instance?

In most cases, we assign the Elastic IP address before configuring the server. However, we are trying to assign the Elastic IP address onto a fully configured server and create an AMI for different instances.

If we associate the new EIP onto an existing instance (created by AMI) will run the same config as the existing one?


Solution

  • Elastic IPs can be allocated and associated to an EC2 instance at any time, while launching or after the launch.

    An Elastic IP address is not actually the property of your instance, rather it's a property associated with your server's network card (Elastic Network Interface).

    See: Elastic IP Addresses - Amazon Virtual Private Cloud