Resizing of an instance is only possible if the root device for your instance is an EBS volume:
If the root device for your instance is an EBS volume, you can change the size of the instance simply by changing its instance type, known as resizing it. If the root device for your instance is an instance store volume, you must migrate your application to a new instance with the instance type you need.
The instance retains its private IPv4 addresses, any Elastic IP addresses, and any IPv6 addresses.
For instances backed by instance store volumes, you cannot directly change the instance type because the instance store is physically attached to the host machine. To "resize" or move to a more powerful instance type, you would need to:
- Create an AMI (Amazon Machine Image) of your existing instance to capture your configurations and data (to the extent possible with instance store volumes).
- Launch a new instance using the created AMI with the desired, more powerful instance type.
- Since instance store volumes are ephemeral, any data on them would be lost upon stopping the instance. You'll need to ensure data you wish to keep is backed up or replicated elsewhere before stopping the old instance.
- To ensure that your users can continue to use the applications that you're hosting on your instance uninterrupted, you must take any Elastic IP address that you've associated with your original instance and associate it with the new instance. Then you can terminate the original instance.
For EC2 instances backed by EBS volumes, changing the instance type to a more powerful one is more straightforward and does not involve data loss:
- Stop the Instance: Before you change the instance type, you need to stop the instance. This does not terminate the instance or delete your data, but it does mean the instance will be temporarily unavailable. however, the instance ID does not change.
- Change the Instance Type: After the instance is stopped, you can change its instance type to a more powerful one from the EC2 console, CLI, or SDKs.
- Restart the Instance: Once the instance type has been changed, you can start the instance again.