1 Open the AWS Management Console and log in: Visit the AWS website
2 To access the EC2 Dashboard, Choose “EC2” from the list of services after logging in. You will then be directed to the EC2 Dashboard.
3 To resize an instance, choose: Find the instance on the EC2 Dashboard you wish to resize, then click on it to select it. An alternative state, such as terminated, prevents you from changing the instance size, therefore make sure the instance is in the “stopped” or “running” state.
4 Stop the instance: Before scaling, your instance must be stopped if it is already operating. To stop the instance, right-click on it, choose “Instance State,” and then click “Stop.” Click “Yes, Stop” to confirm your action
5 Select an instance size: As soon as the instance is chosen, click the “Actions” icon at the top of the page, go to “Instance Settings,” and choose “Change Instance Type.” A new instance size selection dialogue box will be displayed as a result.
6 Choosing a New Instance Size: You can choose from a list of various instance types in the “Change Instance Type” dialogue box. Select the one that has the CPU, memory and other resources you require. After choosing the new instance type, press “Apply.”
changing the t2.micro to t2.medium
7 Activate the instance: You can now restart the instance if you had to stop it in step 4 for whatever reason. Simply perform right-click on the instance, choose “Instance State,” and then click “Start.” Activate the action by selecting “Yes, Start.”
8 Check the Resizing: Check if the instance has been enlarged after the instance has reached the “running” stage. The EC2 Dashboard allows you to view the instance type and its specifications.
Note: that depending on the new instance type and its related pricing, changing the instance size may result in additional charges. Before making any changes, it is advised to study the pricing information and take into account any possible effects on your AWS billing.