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.