How to upgrade EC2 Ubuntu Linux micro instance to small

I was running my wordpress site on Amazon EC2 Ubuntu micro instance and it was performing pretty good. Even though I did not see any issue with this setup (micro instance), I decided to upgrade to small instance. The cost of small instance is approx 2.5 times of micro instance.

Reasons for the upgrade

  1. Small instance gives you 1.7GB memory as compared to 0.6GGB RAM. So far I have been on the border in terms of memory usage. Now I can increase php apc memory size.
  2. Small instance provide  compute unit of 1 (1 core x 1 unit). Micro instance provides 2 compute units (only for short bursts). Otherwise it is a fraction of what small instance provides.
  3. Small instance has better io performance and more storage.

Steps to upgrade

The easiest option it to shutdown the instance and then change the instance type. With this approach no data copying will be required. Here are the steps:

  1. First make sure you take a snapshot of your EBS volume in case something goes wrong. Click on Volumes, select desired EBS volume, click action and then click create snapshot. Here is how it looks in AWS console.
    aws-ebs-create-snapshot-menuName the snapshot appropriately when asked and wait till the snapshot creation is completely done. You can check the status by clicking on snapshots left menu.
  2. Now ensure that your instance shutdown behavior is set to “stop” and not “terminate”. Otherwise shutting down the instance will terminate it. You can view the current value by going to Action -> Change shutdown behavior.
  3. Select the instance and click shutdown from the action menu. Wait till the shutdown is complete. Click on Action again and click “Change Instance Type”.
  4. Select the small instance from the list and click “Yes, Change” as shown below.
  5. Now start the instance (from Action menu). You may have to re-attach any elastic IP address which was earlier attached to this instance.
  6. Connect to the Linux machine and run cat /proc/meminfo. You should see something like this.
    MemTotal: 1692584 kB
    MemFree: 1260636 kB

    Here the total memory is approx 1.69GB which is as expected.

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments