Enabling ENA support on your AWS EC2

idrisrampurawala

Idris Rampurawala

Posted on October 12, 2019

Enabling ENA support on your AWS EC2

AWS provides a wide range of EC2 instance types for different purposes. I wanted to change one of my EC2 instances type from m4 to t3. Generally, EC2 instance type can be changed directly from the AWS console after you stop your instance. When I tried the same, guess what? I ran into this error

Enhanced networking with the Elastic Network Adapter (ENA) is required for the 't3.2xlarge' instance type. Ensure that your instance 'i-XXXXXXXXXXXXXXXXX' is enabled for ENA

As I am not an expert in networking, I did not know what is this all about. After reading out some of the AWS guide pages, I got to know that Enhanced networking provides higher bandwidth, higher packet-per-second (PPS) performance, and consistently lower inter-instance latencies. And in order to move to the latest available instance types, ENA has to be installed and enabled.

I quickly started looking for ways to enable ENA on my m4 instance so that I can move to t3 instance type. But as always, I got confused reading AWS documentation for the same. Later, was able to convert it and thought of sharing these easy steps for the needy to quickly achieve the result.

πŸ“˜ NOTE
There are multiple ways of enabling ENA on EC2 instance, I will be using aws-cli for the same. Check configuring aws-cli to set up aws-cli on your local machine

1. Make sure you have installed aws-cli on your local machine and have required permission on your AWS secret to modify the EC2 instances

2. Stop the instance

$ aws ec2 stop-instances --instance-ids <your-instance-id> --region <your-region>  
Enter fullscreen mode Exit fullscreen mode

3. Check if ENA is already enabled on your EC2

$ aws ec2 describe-instances --instance-id <your-instance-id> --query "Reservations[].Instances[].EnaSupport" --region <your-region>

# if it is enabled, then you will get the following output
[
    true
]

#if it is not enabled, you will get an empty array
[]
Enter fullscreen mode Exit fullscreen mode

4. If ENA is not enabled, then run following command to enable it

# Note: following command won't return any response
$ aws ec2 modify-instance-attribute --instance-id <your-instance-id> --ena-support --region <your-region>

# Verify if above command was a success
$ aws ec2 describe-instances --instance-id <your-instance-id> --query "Reservations[].Instances[].EnaSupport" --region <your-region>  
[
    true
]
Enter fullscreen mode Exit fullscreen mode

5. Voila! Now change your instance type if not already changed from aws console, and start the instance

$ aws ec2 start-instances --instance-ids <your-instance-id> --region <your-region>
Enter fullscreen mode Exit fullscreen mode

Congratulations! πŸ‘ You have successfully enabled ENA support on your EC2 instance with these easy steps. Leave a comment if you face any issues.

See ya! until my next post πŸ˜‹

πŸ’– πŸ’ͺ πŸ™… 🚩
idrisrampurawala
Idris Rampurawala

Posted on October 12, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related