We have received a "instances scheduled for retirement" notification form AWS. It will affect our principle db server. Based on, what I have read, the easiest way is stopping the instance then restart it again.
My understanding is it basically will physically reallocate current instance, which would cause IP change. However, apart from that, what else would be changed.
Currently the instance about to be retired is running as our principle database server. it is connected by both application server (with 20+ web applications) and a slave db server instances.
Connection string between application server and the db instance uses AWS internal computer name (i.e.Data Source=IP-0A882XXX;User ID=username;Password=password;Initial Catalog=dbName;Failover Partner=IP-0A80XXX), which should not be changed after stop/restart. I am I correct?
Is there anything else I should be aware of? such as Security, Firewall Settings, etc.?
If anyone could pointing me to a check list would be greatly appreciated!
When you stop an instance, we shut it down. We don't charge usage for a stopped instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes. Each time you start a stopped instance we charge a minimum of one minute for usage. After one minute, we charge only for the seconds you use.
Stop Instance When you stop an EC2 instance, the instance will be shutdown and the virtual machine that was provisioned for you will be permanently taken away and you will no longer be charged for instance usage.
When you reboot an instance, it keeps its public DNS name (IPv4), private and public IPv4 address, IPv6 address (if applicable), and any data on its instance store volumes. Rebooting an instance doesn't start a new instance billing period (with a minimum one-minute charge), unlike stopping and starting your instance.
By default, Amazon EBS root device volumes are automatically deleted when the instance terminates. However, by default, any additional EBS volumes that you attach at launch, or any EBS volumes that you attach to an existing instance persist even after the instance terminates.
Stopping and starting an EBS boot EC2 instance is similar to rebooting it with these major exceptions:
New internal and external IP addresses (Elastic IP address needs to be re-associated)
Files on ephemeral storage are lost
I wrote the following article that goes into more detail and provides a list of all the finer points to consider:
Rebooting vs. Stop/Start of Amazon EC2 Instance - Alestic.com
The internal EC2 DNS name for your instance matches the internal IP address, so it will change on stop/start, and will need to be updated on your application servers.
You can use the following trick to not have to modify clients when the db server is moved:
Assign an Elastic IP to the internal instance
Use the external Elastic IP DNS name in the client instances.
The EC2 DNS server returns the internal IP address of the instance when queried from another EC2 instance in the same region.
I wrote the following article that goes into detail on how to do this and why it works:
Using Elastic IP to Identify Internal Instances on Amazon EC2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With