Guided Lab: Vertically scaling an Amazon EC2 instance
Description
Scaling an Amazon EC2 instance vertically means modifying its size to meet a particular workload demand. By changing the EC2 instance type, which determines the amount of CPU, memory, network bandwidth, and available storage, users can ensure that their instance has enough resources to handle the workload.
Unlike in traditional data centers, where vertical scaling meant procuring and waiting for hardware components (which could take months), Cloud enables vertical scaling within minutes. You’ll also avoid the logistic problems of having surplus hardware that remains unused. With Amazon EC2, you can test various instance sizes, ensuring you neither overprovision nor underprovision. It’s all about finding that sweet spot tailored to what you need.
Prerequisites
To ensure successful completion of this lab, you must have prior experience in creating EC2 instances and be familiar with their essential components. If you feel that your knowledge in this area is insufficient, we highly recommend taking the following labs to gain the necessary understanding:
- Creating an Amazon EC2 instance (Linux)
- Setting up a web server on an EC2 instance.
Objectives
In this lab, you will:
- Learn what it means to scale an EC2 instance vertically
- Learn how to change the type of an EC2 instance to scale vertically
Lab Steps
Creating the EC2 instances
- Create an EC2 instance using the following configurations:
- Name: td-playcloud
- Instance type: t2.nano
- AMI: Linux
- Key pair: Proceed without a Key Pair.
2. Review your instance configurations and click the “Launch Instance” button.
Vertically scale your instance type from “t2.nano“ to “t2.micro“
1. In the navigation pane, select the “Instances” tab.
2. Select the instance you want to modify and choose “Instance State” > “Stop Instance“. When prompted for confirmation, select “Stop“. The instance may take a few minutes to stop.
3. With the instance still selected, choose “Actions” > “Instance Settings” > “Change Instance Type.” Note that this option will be grayed out if the instance state is not “stopped.“
4. Change your current instance type from t2.nano to t2.micro from the list of Instance Types.
5. If the instance type you selected supports EBS optimization, you can enable or disable it by selecting or deselecting the “EBS-optimized” option.
6. Click “Apply” to accept the new settings.
7. To start the instance, select the instance and choose “Instance State” > “Start Instance“. The instance may take a few minutes to enter the running state.