How to change instance type in AWS

Cannot connect to EC2 instance

You can not connect to your instance?
In some cases just need to change instance type in ec2

Is it possible to change an instance type after it has been created?

Yes, it is possible to change the instance type of an instance after it has been created. You can resize your instance by changing its instance type. For example, if your instance is over-utilized, you can increase its size by changing it to a bigger instance type.

Or you can change it to another instance type, such as m5.large.

You might also want to change from a previous generation to a current generation instance type to take advantage of some features, such as support for IPv6. If you want a recommendation for an instance type that is best able to handle your existing workload, you can use AWS Compute Optimizer 1.

The instructions to follow depend on the instance’s root volume, and whether the instance type is compatible with the instance’s current configuration. For information about how compatibility is determined, see Compatibility for changing the instance type 1.

Please note that when you change the instance type, you’ll start paying the rate of the new instance type. For the on-demand rates of all instance types, see Amazon EC2 On-Demand Pricing 1.

If you want to add additional storage to your instance without changing the instance type, see Attach an Amazon EBS volume to an instance 1.

Change the instance type of an existing EBS-backed instance

Here is a possible way to rewrite the text:

To change the instance type of an Amazon EBS-backed instance
(Optional) If the new instance type requires drivers that are not installed on the existing instance, you must connect to your instance and install the drivers first. For more information, see Compatibility for changing the instance type.

Follow these steps to change the instance type of an Amazon EBS-backed instance:

  • Go to the Amazon EC2 console at [this link].
  • In the navigation pane, choose Instances.
  • Select the instance and choose Instance state, Stop instance.

Choose Stop when asked to confirm. Wait for the instance to stop.

  • With the instance still selected, choose Actions, Instance settings, Change instance type. This option is not available if the instance state is not stopped.
  • On the Change instance type page, do the following:

  • For Instance type, select the instance type that you want.

If the instance type is not in the list, then it’s not compatible with the configuration of your instance. Instead, use the following instructions: Change the instance type by launching a new instance.

(Optional) If the instance type that you selected supports EBS optimization, select EBS-optimized to enable EBS optimization, or deselect EBS-optimized to disable EBS optimization. If the instance type that you selected is EBS optimized by default, EBS-optimized is selected and you can’t deselect it.

Choose Apply to accept the new settings.

  • To start the instance, select the instance and choose Instance state, Start instance. Wait for the instance to enter the running state. If your instance won’t start, see Troubleshoot changing the instance type.

AWS EC2 T2 instance type comparison

Amazon EC2 T2 instances are a great option for low-cost, general-purpose workloads that don’t need a lot of CPU power all the time. They let you burst above the baseline CPU performance when you need it, and they accumulate CPU credits when they are idle. You can also use T2 Unlimited mode to keep the high CPU performance for longer periods without any extra charges. T2 instances are also part of the AWS Free Tier, so you can try them out for free for up to 750 hours per month.

AWS EC2 T3 instance type comparison

If you need a low-cost and flexible way to run your general-purpose apps, you might want to check out Amazon EC2 T3 instances. These are burstable instances that let you use more CPU power when you need it, and pay less when you don’t. They are great for workloads like web servers, code repositories, or small databases. T3 instances have Unlimited mode enabled by default, which means you can burst above the baseline for as long as you want, with a small extra charge. T3 instances use either Intel or AWS Graviton2 processors and offer a range of sizes to suit your needs.