Overview
Lab details
- This lab walks you through how to upgrade and downgrade the EC2 Instance type when the traffic changes.
- Duration: 30 minutes
- AWS Region: US East (N. Virginia) us-east-1
Introduction
What is an EC2 Instance Type?
- Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose the appropriate mix of resources for your applications.
- Each instance type includes one or more instance sizes, allowing you to scale your resources to the requirements of your target workload.
-
There are different types of instance types :
- General Purpose :- These instance types are ideal for new users. They give a better understanding of what are the compute, memory, and networking requirements of your applications, run stress tests, and can move to advanced instance types.
- Compute Optimized :- These are used when high performance processors are needed. Use cases include batch processing workloads, media transcoding, high performance web servers, high performance computing (HPC), scientific modeling, dedicated gaming servers and ad server engines.
- Memory Optimized:- Memory-optimized instances offer a large memory size designed for memory intensive applications including in-memory applications, in-memory databases (such as SAP HANA), in-memory analytics solutions, High Performance Computing, Electronic Design Automation, scientific computing and enterprise applications.
- Storage Optimized:- Storage optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. They are optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications.
- Accelerated Computing:- Accelerated computing instances use hardware accelerators, or co-processors, to perform functions, such as floating point number calculations, graphics processing, or data pattern matching, more efficiently than is possible in software running on CPUs.
- Sometimes there is a need to change the EC2 instance type due to sudden traffic change and due to which , the need for vCPUs, memory(GiB), network bandwidth etc. So It is important to learn how to change the EC2 instance type.
Architecture diagram

Task details
- Sign into AWS Management Console
- Launching an EC2 Instance
- Upgrading Instance type from t2.micro to t2.medium
- Downgrading Instance type from t2.medium to t2.micro
- Validation of the lab
- Deleting AWS Resources
Launching the lab environment
- To launch the lab environment, Click on the Launch lab button.
- Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
- Once the Lab is started, you will be provided with IAM user name, Password, Access Key, and Secret Access Key.
You can only start one lab at any given time.
Lab guide
Lab steps
Task 1: Sign in to AWS Management Console
- Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
-
On the AWS sign-in page,
- Leave the Account ID as default. Never edit/remove the 12-digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
- Now copy your User Name and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign in button.
- Once Signed In to the AWS Management Console, Make the default AWS Region as US East (N. Virginia) us-east-1.
Task 2: Launching an EC2 Instance
- Make sure you are in the US East (N. Virginia) us-east-1 Region.
- Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.
- Navigate to Instances on the left panel and click on Launch instances button.
- Name : Enter MyEC2Server

- For Amazon Machine Image (AMI): Search for Amazon Linux 2023 AMI in the search box and click on the Select button.

- For Instance Type: Select t2.micro

- For Key pair: Select Create a new key pair Button
- Key pair name: Enter WhizKey
- Key pair type: Select RSA
- Private key file format: Select .pem
- Select Create key pair Button.
- In Network Settings Click on Edit Button:
- Auto-assign public IP: Select Enable
- Select Create security group.
- Security group name: Enter MyEC2Server_SG
- Description: Enter Security group to allow traffic to EC2.
-
For Inbound Security group rules, Choose Type: SSH and Source: Select Anywhere

- Keep Rest thing Default and Click on Launch Instance Button.
- Select View all Instances to View the Instance you Created
- Launch Status: Your instances are now launching, Navigate to Instances page from left menu and wait the status of the EC2 Instance changes to running.
Task 3: Upgrading Instance type from t2.micro to t2.medium
In this task , we will change the instance type from t2.micro to t2.medium. t2.micro contains 1 vCPU, 1 GiB memory and 6 CPU credits/hour. t2.medium contains 2 vCPUs, 4 GiB memory and 24 CPU credits/hour.- Make sure you are in the US East (N. Virginia) us-east-1 Region.
- Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.
- As we cannot change the instance type when the EC2 Instance is in running state, therefore we have to stop the instance first, and then we can change the instance type.
- Select the EC2 Instance and click on Stop Instance under Instance State Button.

- Click on the Stop button.

- Once the Instance state of EC2 instances changes to Stopped, select the EC2 instance and click on Instance settings under the Actions button.

- Click on the Change instance type button.

- Select the t2.medium from the Instance type dropdown. Click on the Change button.
- You can see the instance type changed successfully.

- Now we can start the instance again. Select the EC2 Instance and click on Start Instance under Instance State Button.

Task 4: Downgrading Instance type from t2.medium to t2.micro
- Make sure you are in the US East (N. Virginia) us-east-1 Region.
- Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.
- As we cannot change the instance type when the EC2 Instance is in running state, therefore we have to stop the instance first and then we can change the instance type
- Select the EC2 Instance and click on Stop Instance under Instance State Button.
- Click on the Stop button.

- Once the Instance state of EC2 instances changes to Stopped, select the EC2 instance and click on Instance settings under the Actions button,

- Click on the Change instance type button.

- Select the t2.micro from the Instance type dropdown. Click on the Change button.
- You can see the instance type changed successfully.

- Now we can start the instance again. Select the EC2 Instance and click on Start Instance under Instance State Button

- You can see the instance running.

Task 5 : Validation Test
- Once the lab steps are completed, please click on the Check my work button on the left side panel.
- This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
- Sample output :

Task 6: Deleting AWS resources
- Make sure you are in the US East (N. Virginia) us-east-1 Region.
- Navigate to EC2 by clicking on the Services menu in the top, then click on EC2 in the Compute section.
- Select the EC2 Instance and click on Terminate Instance under Instance State Button.

- Click on the Terminate button.

Completion and conclusion
- You have created an EC2 Instance.
- You have successfully upgraded EC2 Instance type.
- You have successfully downgraded EC2 Instance type.
- You have deleted all the AWS resources.
End lab
- Sign out of AWS Account.
- You have successfully completed the lab.
- Once you have completed the steps, click on End lab in the IP Lab Portal.
What gets checked
When you press Check my work, the platform verifies each of these:- Launch an EC2 Instance — Check whether an EC2 Instance is launched or not.
- Launch EC2 AMI type Amazon Linux — Check whether the EC2 instance is launched using an Amazon AMI.
- Validate EC2 Instance Type t2.micro — Check whether the EC2 instance type is t2.micro.


