How to change EC2 Instance to an ENA supported Instance type

Step1: Verify if the ENA driver is installed on the EC2 Instance by running the modinfo command as below:

modinfo ena                                                        

If ENA driver is not installed, you need to first install it.

Step2: Check if ENA is enabled on the EC2 Instance by running the below command:

aws ec2 describe-instances --instance-ids INSTANCEID --query "Reservations[].Instances[].EnaSupport"

If ENA is already enabled, the output from above command says “True”. If there is no output from the above command, ENA is not enabled. Stop the Instance and enable ENA using the below commands:

aws ec2 stop-instances --instance-ids INSTANCEID 
aws ec2 modify-instance-attribute --instance-id INSTANCEID --ena-support

Step3: Change the EC2 Instance type and start the Instance as shown here from AWS Management console or from CLI using the below commands:

aws ec2 modify-instance-attribute --instance-id INSTANCEID --instance-type "{\"Value\": \"r5.xlarge\"}"
aws ec2 start-instances --instance-ids INSTANCEID                    

See also  How to enable Termination Protection on an EC2 Instance