[Safely] Update an Ubuntu EC2 instance on Amazon AWS

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

Greg is Director of Engineering at WebDevStudios and author of a children's book titled, Creating a Website: Design and Build Your First Site!.

One 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.