[Safely] Update an Ubuntu EC2 instance on Amazon AWS

amazon-servers

Ubuntu 12.04.1 LTS was released and that meant it was time to upgrade my Ubuntu EC2 instances from 11.10 to 12.04.1 LTS.

When I logged in via SSH I saw the nag “do-release-upgrade” and thought, “crap…the last time I did this, I blew up my server”. After doing a few Google searches, the light bulb came on and I thought, “Duh!”

First, create an Amazon Image (AMI) of your existing server. This creates a fully functional carbon copy of your current instance, which can be launched and deployed at will.

When it’s finished, go ahead with the upgrade:

sudo do-release-upgrade

If anything fails, you can simply launch the newly created AMI and re-associate your Elastic IP. (You ARE using an Elastic IP right?)

BTW: The upgrade from Ubuntu 11.10 to 12.04.1 LTS went flawlessly, and after a few days I will delete the AMI and associated EBS volumes.

Author: Greg Rickaby

Follower. Husband. Father. Front-End Developer Lead WebDevStudios

1 thought on “[Safely] Update an Ubuntu EC2 instance on Amazon AWS”

  1. Thanks very much for this article.. first timer here doing the upgrade.. man is it nerve wracking..

Leave a Reply