You have an EC2 Instance which is an EBS backed Instance.
An application hosted on this instance is having issues.
To resolve the issue, the best bet is to upgrade the instance to a higher instance type.
How can you achieve this?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer: B.
According to the AWS Documentation, EBS-backed instances must be stopped before changing the instance type.
Options A, C and D are invalid for the scenario.
For more information on Resizing EC2 Instances, please refer to the below URL-
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.htmlTo upgrade an EC2 instance to a higher instance type, there are several options available, but the most appropriate one will depend on the specific situation and requirements. Let's analyze each answer option:
A. Directly change the instance type from the AWS Console: This is a valid option if the instance is not currently running any critical workloads, and if there are no dependencies on the instance's current state. If the instance is running an application with active user sessions, changing the instance type directly can cause downtime and session loss.
B. Stop the Instance and then change the Instance Type: This option is suitable if there is no concern about potential downtime during the instance upgrade. Stopping the instance will temporarily halt the application running on it, and any data stored on the instance's ephemeral storage will be lost. Before proceeding with this option, ensure that the instance can be stopped and restarted safely.
C. Detach the underlying EBS volumes and then change the Instance Type: This option is a good choice if the instance is running a workload that requires persistent data storage. Detaching the EBS volumes allows you to preserve the data stored on them while the instance is upgraded. After the instance upgrade, you can reattach the volumes and resume the application's operation.
D. Detach the underlying ENI and then change the Instance Type: This option is not suitable for upgrading the instance type. Detaching the ENI will result in the instance losing network connectivity, which will disrupt any workloads running on it.
In summary, the most appropriate option to upgrade an EC2 instance to a higher instance type depends on the specific requirements of the application and the desired level of downtime. Option C, detaching the underlying EBS volumes, is generally a good choice if the instance is running a workload that requires persistent data storage.