In today’s tutorial, I’ll show you how you can upgrade or downgrade your EC2 instance type to scale your website for increased visitor traffic.
What is an EC2 Instance?
EC2 stands for Elastic Cloud Compute. It is one of the services offered as part of Amazon Web Services (AWS).
An EC2 instance is a computer on the cloud that you rent for a fee every second it is operational.
You can start or stop an EC2 instance at any time. As a result, EC2 instances are great for temporary computing tasks like processing large amounts of data.
EC2 instances can be kept online permanently for computing tasks like web hosting.
In fact, I use EC2 to host SitesMonster!
Once you are done with your computing task, you can stop the EC2 Instance.
EC2 instances are available in various sizes, such as T2, T3, and M1.
The larger the size of an EC2 instance, the more powerful the machine. However, the more powerful the machine, the more expensive the EC2 instance is per second.
You may want to upgrade your EC2 instance if your website traffic grows and you need a faster machine.
How to Upgrade an EC2 Instance
If you do find that you need to change the EC2 instance type from the one you originally picked when you started EC2, follow the steps below:
The first thing you need to do is sign in to your AWS account.
Once you do, you will see the AWS Dashboard, showing all of the services offered in AWS.
Locate the EC2 service and click it to go to your EC2 dashboard.
Once here, you will see a section at the top named Resources.
Click on Running instances to see all of your currently active EC2 instances.
You should now see a table containing all of your started and stopped EC2 instances. I have two, one for each of my blogs.
One caveat of EC2 is that an instance type cannot be upgraded or downgraded while it is running.
That makes total sense though if you think about it.
Imagine upgrading a component inside of a physical computer. You would need to turn it off before taking out the old component.
EC2 is very much the same.
Therefore, stop the running EC2 instance before we are allowed to change the instance type.
Select the EC2 instance you wish to upgrade so a blue square appears to the left of its name.
Click on the Actions button in the top left, and then navigate to Instance State and then click Stop.
Wait while the EC2 instance stops. You cannot access a stopped EC2 instance.
If you are hosting a blog on your EC2 instance like I am, understand that a stopped EC2 instance will shut everything down. Therefore, your readers will not be able to access your blog or website.
Stopping an EC2 instance can take some time as it safely stops all of the processes and services running on that machine.
You can refresh the status of your EC2 instance by clicking on the Refresh icon in the top right-hand corner. Alternatively, you can refresh the page.
Once the status of your EC2 instance changes from running to stopped, again click on the Actions button in the top left and navigate to Instance Settings.
Then click Change Instance Type.
Once here, you can select to downgrade or upgrade the EC2 instance type.