Changing the instance type of your EC2 instances can be a very useful tool:

  • You can lower your costs by strategically scheduling the changing of the instance type to meet your load requirements
  • You can lower or increase your instance types as your business needs change

However, the following are some tips to be aware of when changing the instance type of your EC2 instances.

Stopping your EC2 Instance is Required

In order to change the instance type of your EC2 instance, the EC2 instance must be stopped. A running EC2 instance cannot be changed. The instance only needs to be stopped for a very short time before being restarted, usually only for 60 seconds or so. But this will result in some downtime for your EC2 instance.

Non-Elastic IP Addresses Will Be Re-Assigned

Since the EC2 instance is being stopped, if you are not using an Elastic IP address on your EC2 instance, then the public IP address will change.

To maintain the same IP address, assign an Elastic IP address to your EC2 instance.

Not All EC2 Instance Types Support EBS-Optimized

EBS optimized is only available on some EC2 instance types. For some types, it's not available at all, for others it's mandatory, and it's optional on the rest.

For example, the T2 instance family does not support EBS-optimized. However, the M4 instance family requires EBS-optimized.

So, when switching EC2 instance types, take this into consideration. For example, when switching between T2 and M4 instance types, switch the EBS-optimized flag on your EC2 instance as well, otherwise the instance will not start.

It's Reversible

When switching EC2 instance types, don't worry. If the EC2 instance does not start after switching types, or you get an error during start, just switch it back.

Did this answer your question?