AWS Instance Resiliency

I recently discovered that changing the size of and EC2 instance does not destroy the EBS volume associated with it. Let that sink in. You have a computer sitting on your desk serving your website. You realize that you’re spending too much money on electricity for this computer, so while it is running, you rip the hard drive out and put it in another computer. In 5 seconds, your website is still running.

This blows my mind. I have nginx and wordpress installed on this machine, both of which are ostensibly started with systemd commands. Not only was all the data intact, but all the services were started when I switched the instance size from t2.medium to t2.nano. There was effectively no service interruption for my business site.

I’m not going to go in to an analysis now of how this was actually accomplished by AWS. Mostly, writing this stuff down solidifies the thought in my head. Welcome to the future indeed.