NixOS / nixops-aws

GNU Lesser General Public License v3.0
53 stars 37 forks source link

ebsOptimized seems to have no effect #64

Open jekor opened 7 years ago

jekor commented 7 years ago

I'm seeing the same issue as https://github.com/NixOS/nixops/issues/488

If I deploy the same instance in the same region and availability zone via the AWS console, it's EBS Optimized. If I deploy via nixops, EBS Optimized is false. Instance is m4.large.

jekor commented 7 years ago

A workaround is to stop the newly-launched instance and run:

aws ec2 modify-instance-attribute --instance-id i-xxxx --ebs-optimized

Note that this does not work for spot instances as they cannot be stopped.

jekor commented 7 years ago

The problem seems to be here: https://github.com/NixOS/nixops/blob/55391626bb8e9abad4609e9f4b8a6cbb8a19bce8/nixops/backends/ec2.py#L884-L891

If I set prefer_ebs_optimized to True I get an EBS Optimized instance. Note that I do not have any EBS volumes defined but I want to have an EBS Optimized instance for the volumes I will attach manually.