Hfengyun is an official AWS service tier partner focused on providing customers with discounted AWS billing and a range of technical support.
©2024, hfengyun. AWS Discounted Billing | AWS Partner Network
In order to guarantee maximum efficiency, customers must assess their key metrics and keep an eye on the performance of their instance specs, which include over 275 instance variants based on CPU, memory, storage type, and network speed.
There are some reasons why you may wish to change the EC2 instance you are running in AWS. It could be because you have a cluster in AWS EC2 Container Service. When setting up the cluster, you used a t2.micro instance and now you want to use a more powerful instance. Or maybe you have two clusters on ECS again and want to remove one of them.
This post will discuss the requirements for switching the AWS EC2, EBS, and Storage Backup instance types and provide tips for selecting the type that best meets your needs. Alternatively, you can follow the detailed instructions for updating or fine-tuning your EC2 instance type.
Elastic Compute Cloud, also known as EC2, is an IaaS (Infrastructure as a Service) product from Amazon Web Services. It is essentially a service that operates virtual computers on the AWS cloud, with developers having the ability to modify or upgrade the instance kinds or specs according to current usage.
To guarantee maximum efficiency, customers must assess their key metrics and keep an eye on the performance of their instance specs, which include over 275 instance variants based on CPU, memory, storage type, and network speed.
I’ve compiled some of the more discussed reasons for the change
Change workload type – If an EC2 instance’s workload shifts from CPU-intensive to RAM-intensive, it may be more effective to migrate to an instance family that is better suited to the new workload.
Migrating from a previous generation instance type to a current generation instance type – AWS regularly updates its instance family, and a newer generation of instances often provides better performance at a reduced cost.
Increase resources – As your application’s demands grow, you may require additional CPU, memory, or network throughput, which is presumably a positive thing.
Reduce resources – Perhaps you wish to save money by eliminating any unused resources.
If you decide to alter the instance type for performance or cost management reasons, you can simply do so:
Virtualization types are the same: PV (Paravirtual Machine) or HVM (Hardware Virtual Machine). EC2 supports both types of virtualization, and instances cannot be switched between them.
Network compatibility – Newer instances must be located in the VPC, therefore EC2 Classic instances cannot be converted to newer instance types if they are not in the VPC.
Same CPU architecture, with limited support for 32-bit AMI, Arm processors, and so on; for example, switching from an Intel CPU instance to an AMD CPU instance is not allowed.
Root storage is an EBS volume. If your root volume is based on instance storage (ephemeral storage), the application must be updated to the latest instance type.
The NVMe driver is deployed for instances that support NVMe (Non-Volatile Memory Express) SSD Instance Storage volumes.
Enhanced Network Drivers Installed – If the new instance type offers enhanced networking features, you must install them before resizing.
The EC2 instance you wish to modify can be easily altered or “resized” if it has an EBS (Elastic Block Storage) root partition. If the instance type you are resizing is incompatible with the instance type you already have, you will have to build a new instance and move your data and apps to it (more on this in the next section).
An instance that supports EBS must be stopped before it can be resized. The following considerations must be made when terminating or restarting an EC2 instance:
The instance ID won’t change even though the instance will be transferred to fresh hardware.
The public IPv4 address, if any, will change, but the instance will keep any related elastic IP addresses, private IPv4 addresses, and any IPv6 addresses.
In order to avoid the instance being flagged as “unhealthy” and terminated, it can be preferable to turn off the scaling process when resizing an instance that is a member of an auto-scaling group.
In addition to any unforeseen problems, downtime should be planned for when the instance ceases. A maintenance window may need to be arranged because the procedure can take several minutes.
1. Install any necessary drivers (NVMe driver, Enhanced Network Driver) for the new instance type in the running instance.
2. Select the instance from the navigation pane after launching the EC2 console
3. After choosing the instance, choose Operation, Status, and Stop.
4. Select Yes Stop in the dialog box
5. Ensure that the instance is still selected by choosing Actions, Instances, Settings, and Change Instance Type.
6. Only suitable instance types are displayed in the drop-down menu of the resulting dialog box; if the requested instance type is not displayed, it cannot be changed to that instance type. You can choose Enable in the checkbox if the instance type you wish to switch to supports EBS optimization
7. Choose Operations, Instance Status, Startup, and then choose Yes Startup in the resulting dialog box to restart the stopped instance. The instance may take several minutes to get to the running stage.
The procedure is a little more involved if you wish to modify the kind of EC2 instance that the Instance Store supports.
It is not possible to simply switch the instance type; instead, you have to create an image of the current instance and then launch a new instance of the desired kind from the image to migrate to the new instance type.
1. Create a persistent storage backup of all the data on the instance storage volume. for any EBS volume that is attached. To reconnect to the newly established instance, you can either take a snapshot or remove the volume from the instance.
2. For the instance storage backup instance, create the AMI. Create the Linux AMI for instance storage backups by following these steps.
3. In the EC2 console, find the AMI you just created
4. Choose Startup after selecting the AMI you wish to use.
5. In the startup wizard, choose the instance type you want; if it is not displayed, it is incompatible with AMI.
6 .If the initial instance is no longer required, terminate it.
You’re in luck if you know you need to switch the type of EC2 instance you’re using, but you’re not sure which of the almost 300 different instance types to pick.
AWS Compute Optimizer is prepared to offer you guidance on how to increase efficiency, reduce costs, or do both.
Existing EC2 instance specifications and utilization metrics are examined by the Compute Optimizer. It will suggest the kind of EC2 instance that best suits your workload by comparing the data.
Overconfigured: It’s okay to downgrade if there is excessive CPU, memory, or network traffic.
Under-configured: You may need to upgrade because you require more CPU, memory, or network performance.
Everything is simply right and optimized.
None of them: Compute Optimizer does not currently support the instance type, or there is insufficient data to make instance-specific recommendations.
Computer Optimizer is free to use, but before you can start gathering information and using it to make recommendations, you must opt in. Obtaining any information or suggestions could take up to twelve hours.
The suggested instance type and hourly on-demand cost for the suggested instance will be shown in the recommendations.
That’s all. AWS offers resources to assist you in selecting the appropriate instance type from the wide range of possibilities. Hfengyun can assist if all of this still seems a little daunting. We regularly optimize EC2 instances for our clients while minimizing downtime; perhaps we can assist you with that as well. Take a look at our AWS Managed Services.
6 RAFFLES QUAY
Singapore
+65 80951058
sign230203@gmail.com
©2024, hfengyun. AWS Discounted Billing | AWS Partner Network