In previous article, I have provided step by step procedure to create a new aws ec2 windows server instance, now in this article, I have provided step by step guide to resize or upgrade AWS EC2 Instance using Amazon Console.
Table of Contents
Upgrade AWS EC2 Instance (With Few Minutes Downtime)
In this method, when we will be upgrading AWS EC2 Instance, there will be downtime of sometime, you can consider this time of 5 minutes, there is another method also without downtime, but this one is easier with 5 minutes or less downtime so, we will check this one first.
- Login into your AWS EC2 Console.
- Navigate to "Instances" (From left-pane) and Select instance which you want to upgrade
- Now, right-click on instance and select "Stop Instance", since, we cannot upgrade running instance, we will have to stop it, it will not take time.
- Once, you have stopped the instance, Right-Click on it, and then select "Instance Settings", then select "Change Instance Type"
- On Instance Selection screen, choose the new instance type, for example, I am upgrading from "t2.Micro" to "t2.medium", so select "t2.medium" and click "Apply"
- Then Again, right-click instance, and select "Start Instance", to start it.
- After a minute or two it will start working with upgraded version of instance.
- That's it, as you can see on above image, Instance is upgraded from t2.Micro to t2.Medium
The above procedure is simple, but as we will be stopping instance for few minutes so it can take upto 5 mins to stop and start server, during this time, your server will be down, and if you have already hosted web-applications, then it will be down with it.
Upgrade or Resize AWS EC2 Instance with Zero Downtime
There is another method, using which there will be no downtime for your server, here are the steps for it.
- Create a image of your Current Instance, you can do this, by right-clicking on your Instance, and then select "Image" -> "Create Image" (Creates an AMI of the instance)
- Now create a new EC2 Instance with upgraded configuration and using above created image
- Deasccociate Public IP Address from old server and associate it with new EC2 Server
- That's it, your new upgaded Ec2 instance is ready.
- You can terminate old instance, after checking new one has all your data.
Although, using this method there will be no downtime, but I will recommend method 1, which is much easier and you can carry upgrade on Weekends when your web-application traffic is minimal.
You can also leverage zero downtime using Amazon CloudFront content delivery network (CDN), which will
- cache your on-premise data until you want to switch traffic.
- Switch and propagate to AWS endpoint distribution.
- You can also use redirect rules within Amazon Cloudfront
That's it, hope the above guide helps you in upgrading AWS instance, you can also automate AWS instance upgrade procedure, but we will discuss it in some next article.
You may also like to read:
AWS vs DigitalOcean (With Price Comparison)
Best APM Open Source Tools (Top 10 apm tools)