简体   繁体   中英

In AWS is there a thing like a private elastic IP address?

I have an EC2 instance with a stateful service on it (think database). It has an explicitly set VPC-internal IP address which I am using in clients.

Now I would like to re-instance, reboot or otherwise perform maintenance on that instance without clients erroring out. I could spin up a second instance and point all clients to the new IP address, but this way I would still need to synchronise both instances until the last client switches over.

In AWS you can have elastic IP addresses . This allows you to switch the instance an IP is pointing to. Problem is those are public (reachable from the internet). I want a VPC-internal IP address I can re-assign between instances. Is there such a thing in AWS?

Yes, you can do it by attaching additional network interface(eth1)to the instance which will be assigned a private IP. During the maintenance of the instance, you can move the network interface to the new instance.

Link: docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM