Closed clong closed 4 years ago
Temporary workaround is to set the default availability zone to us-west-1b in Line 11 of Terraform/variables.tf
Looking for help on this one.
The Windows 2016 AMIs seem to support ENA natively (meaning I don't have to do anything for AWS to recognize them as supporting ENA):
DC
$ aws ec2 describe-images --image-id ami-00beb549af8618fd3 --query "Images[].EnaSupport"
[
true
]
WEF
$ aws ec2 describe-images --image-id ami-09256c7aa0b81dc92 --query "Images[].EnaSupport"
[
true
]
However, even after installing the Windows Enhanced Networking package on the Win10 Packer build, it isn't recognized as having ENA support after converting it to an AWS AMI:
WIN10 with ENA Package Pre-Installed from Packer via install-aws-ena.ps1
$ aws ec2 describe-images --image-id ami-004c16a4f87c540b8 --query "Images[].EnaSupport"
[
false
]
Unfortunately, Terraform won't let us select a t3.medium instance for WIN10 unless it detects that ENA is enabled on the AMI:
Error: Error launching source instance: InvalidParameterCombination: Enhanced networking with the Elastic Network Adapter (ENA) is required for the 't3.medium' instance type. Ensure that you are using an AMI that is enabled for ENA.
Ah, it looks like I have to create an instance, run aws ec2 modify-instance-attribute --instance-id instance_id --ena-support
and then create a new AMI from that instance. Annoying, but I think it should probably work. Testing now.
Doesn't seem to work yet. The WIN10 AMI doesn't pull any IP address after doing this and using a t3 instance.
I don't think this solution is going to work from a build pipeline perspective. I either need to find a way to enable the support natively in the AMI without booting up an instance or just leave the Win10 host as a t2.
Don't think it's worth fixing this by getting ENA supported on Win10, especially after us-west-1a stopped including t2 and t3 medium instances. I'm addressing this here: https://github.com/clong/DetectionLab/commit/d686a50f81a6709c82c4d9f097134cdc30898a27