How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Amazon Ec2Amazon Web-ServicesUpgrade

Amazon Ec2 Problem Overview


I have an Amazon EC2 micro instance (t1.micro). I want to upgrade this instance to large.

This is our production environment, so what is the safest way to do this?

Is there any step by step guide to do this?

Amazon Ec2 Solutions


Solution 1 - Amazon Ec2

Using AWS Management Console:

  • Right-Click on the instance
  • Instance Lifecycle > Stop
  • Wait...
  • Instance Management > Change Instance Type

Solution 2 - Amazon Ec2

From my experience, the way I do it is create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point.

This is my approach if I do not want any downtime(i.e. production server) because this solution only takes a server offline only after the new one is up and running(I also use it to add new machines to my clusters by using this approach to only add new machines). If Downtime is acceptable then see Marcel Castilho's answer.

Solution 3 - Amazon Ec2

Using the AWS Management Console

  • Go to "Volumes" and create a Snapshot of your instance's volume.
  • Go to "Snapshots" and select "Create Image from Snapshot".
  • Go to "AMIs" and select "Launch Instance" and choose your "Instance Type" etc.

Solution 4 - Amazon Ec2

Use the AWS EC2 console, not ElasticFox.

First Way:

  • Create a new AMI of the instance
  • Launch it

Alternative Way:

  • Make a snapshot of the disk
  • Launch a large EBS instance with the same AMI type (please note that at this point the disk will contain the data that was present when this AMI was created, not your latest changes)
  • Once is fully booted, stop the new instance
  • Detach the root volume from the stopped instance
  • Create a virtual disk from the snapshot created before in the same availability zone of the new instance
  • Attach the root volume to /dev/sda1
  • Start the new instance again

Solution 5 - Amazon Ec2

Create AMI -> Boot AMI on large instance.

More info http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/creating-an-image.html

You can do this all from the admin console too at aws.amazon.com

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiongandilView Question on Stackoverflow
Solution 1 - Amazon Ec2Marcel de CastilhoView Answer on Stackoverflow
Solution 2 - Amazon Ec2LostsoulView Answer on Stackoverflow
Solution 3 - Amazon Ec2StyelzView Answer on Stackoverflow
Solution 4 - Amazon Ec2stivloView Answer on Stackoverflow
Solution 5 - Amazon Ec2kieranView Answer on Stackoverflow