So, if you are running WIndows 10 on AWS following my guide here you might at some point need to resize your EC2 instances. Normally, this is a pretty quick change, shut down the instance, change instance type and boot up again.
But! And there is always a but. If you are running lower performance instance types (looking at you t2 instance types), these are not enabled for ENA (Elastic Network Adaptor, so you cannot change the instance type from a T2 to a t3, or an M5, etc. So, how do we do it.
The AWS documentation does a decent job of explaining it, however it is very complicated, when the actual process of enabling ENA is pretty straight forward. Not as straightforward as clicking a couple of buttons in the UI, you need to roll up the sleeves, and hit the AWS CLI.
To begin, you will need the following.
- Fully connected AWS CLI tool
- Instance ID of the instance you want to add the Elastic Networking Adaptor
Got it? OK, let’s hit the CLI.
The first thing we need to do is to verify if ENA is already enabled on an instance. To do this, we execute the following command at the CLI
aws ec2 describe-instances --instance-ids i-230948203482 -query "Reservations{}.Instances{}.EnaSupport"
This will return either a true or false answer (by the way, don’t forget to change the instance ID to your instance - the above instance id is made up). If ENA is not enabled, the result will look something like this.
So, for the above instance, ENA is not enabled, so let’s get it enabled shall we? We need to login to the Windows 10 EC2 instance as an admin user. Once logged in, we need to download and install the ENA driver, which can be downloaded here. Within the EC2 instance extract the zip file to somewhere that is easy to access. Once done, launch a powershell command (as admin is required), and browse to the location of the files you have extracted. One there, execute the ./install.ps1 command.
That being done, we now need to shut down the EC2 instance, and get back into the AWS CLI tools where we are going to edit the parameters of the instance (again not available via the AWS Console)
We execute the following command.
aws ec2 modify-instance-attribute --instance-id i-0000000000000 --ena-support
Then, we can again run the ENA check from the AWS CLI, and this time it should return a “true” value.
Now, from the AWS console, we can edit the instance type for this instance.
As always, if there are questions, let me know.