Amazon AWS provides ec2 instances of various types namely micro, small, medium etc. These instances types differ on the CPU, Memory, Storage, and networking capacity. AWS also provides various ranges of ec2 instances like t2, m3, m4, c3, c4 etc. All these range of instances have their own unique features in terms of best usage of CPU, memory and networking capacity to provide robust computing environment. One of the best feature of AWS ec2 instance type is that, it provides the flexibility of changing the instances type based on the demand and usage. If usage is more, then you can opt for higher instances type or else you can downgrade the instance type to save your expenses.
In this article, I will show you how to change the ec2 instance type in Amazon AWS without losing data or terminating the instance.
Before we dive in, make sure the root device type of the instance is ebs. First step, you need to perform is stop the instance. To do this, select the instance on your ec2 dashboard, and go to
Actions => instance state => stop
Once you hit of stop button, a warning will be displayed like “Any data on the ephemeral storage of your instances will be lost”. Click ok and continue. It takes 1 or 2 min to stop the instance. Once the instance is stop, the colour of the instance state will turn orange and red and status will be as stopped.
In the next step, go to Actions=>Instance Settings => Change Instance Type
A popup modal box will be opened where you can select the type of instance and hit apply to update.
Important Points to Note:
When you are using the instance with a public IP and not an elastic IP, then be informed that the public IP will change every time you stop and start the instance. If your instance is associated with an elastic IP, then there is no need to worry about the IP change.