'Attach EBS volume to this AWS ec2 instance?

I’m running a website on an m3.2xlarge AWS ec2 instance which is EBS backed.

I want to change the instance type to m2.2xlarge instance.

This new instance already has instance storage of 850 gb hdd.

My question is: can I attach the existing EBS drive to the new m2.2xlarge instance? and boot to the website?



Solution 1:[1]

There are 2 possibilities

1

  • stop your running Instance, Detach the volume (or take a snapshot of it)
  • Now while launching the new Instance you can add additional volume along with your Root volume (of new Instance). Just keep in mind you cannot delete or exclude the Root volume of new Instance while Launching, its just that you can add an extra volume along with the root volume

2

  • Stop your running Instance
  • Go to actions and then Select Insatnce Setting and then click on Change Instance Type
  • Select your desired Type of Instance
  • after changing the Type of instance, you can restart the Instance

enter image description here

Solution 2:[2]

Your existing EBS will remain attached after resizing. You will not get to see instance store which comes with m2.2xlarge. This won't get add up to resized instance. This is based on the documentation here:

When you resize an instance, the resized instance usually has the same number of instance store volumes that you specified when you launched the original instance. If you want to add instance store volumes, you must migrate your application to a new instance with the instance type and instance store volumes that you need

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 karan sharma
Solution 2 halfer