Is it possible to change the private IP addresses of an EC2 while it is Running/Stopped in a VPC?
AdithyaPundit
Is it possible to change the private IP addresses of an EC2 while it is Running/Stopped in a VPC?
Share
Yes, it is possible to change the private IP address of an Amazon Elastic Compute Cloud (EC2) instance while it is running or stopped in a virtual private cloud (VPC).
If you want to change an EC2 instance’s private IP address while it is running, use the “Modify Network Interface” action in the AWS Management Console or the “modify-network-interface” AWS CLI command. This allows you to assign a new private IP address to the instance’s network interface.
If you want to alter the private IP address of an EC2 instance while it is stopped, use the AWS Management Console’s “Modify Network Interface” action or the “modify-network-interface” AWS CLI command, or use the AWS Management Console’s “Modify Instance” action or the “modify-instance” AWS CLI command. You may assign a new private IP address for the instance’s network interface using either of these steps.