My AWS reserved instance t2.micro is going to expire. I decided to upgrade to t2.small, and have just bought a new reserved instance t2.small, as shown below.
Now, how do I switch from t2.micro to t2.small?
My AWS reserved instance t2.micro is going to expire. I decided to upgrade to t2.small, and have just bought a new reserved instance t2.small, as shown below.
Now, how do I switch from t2.micro to t2.small?
One strategy would be to take an image snapshot of your micro
instance and use it for the small
instance.
You'll need to stop one instance and start the other at the appropriate time. Either write a script that uses the AWS SDK in the language of your choice, or do it manually.
Don't forget about DNS and IP addresses with respect to making the switch, and that you'll have downtime unless you have some overlap. I would recommend you leave micro
running while you start the small
and change your routing etc.
Please note that a Reserved Instance is a pricing discount. It does not apply to a specific instance.
By purchasing a t1.micro
reserved instance (RI), one instance matching the specification (Instance Type + Operating system + optional AZ) can run every hour during the RI period at no charge (because you have paid for it up-front, either annual or monthly).
The only 'danger' of going past your RI expiry is that the instance will be charged the standard hourly On-Demand rate (about 1.2c/hour for Linux instances). Similarly, the only 'danger' of using a t2.small
prior is being charged the hourly rate of 3.2c/hour.
Therefore, if you can survive the instance being offline for a few minutes, simply:
It doesn't matter if you don't do it at the perfect time... you'll just be charged a few cents.
Further, if your new Reserved Instance is regional (meaning that no Availability Zone has been selected), then you can take advantage of Instance Size Flexibility. This is best understood by example:
t1.micro
t1.small
So, if your new RI is regional, it doesn't matter if you change the instance size late. Your t2.small RI will actually cover the cost of the t2.micro instance (and could actually cover the cost of 2 x t2.micro instances).
Bottom line: Change your instance type whenever you want. The cost of getting the timing wrong is negligible.
As I didn't change the instance type (T2), here is what I do.
Instances --> Actions --> Instance State --> Stop
Instances --> Instance Settings --> Change Instance Type --> t2.small
Actions --> Instance State --> Start