Dominate AWS Provisioning: Introducing ec2-instance-selector
top of page

Introducing ec2-instance-selector

Updated: Jul 11

When provisioning a spot fleet, getting the correct instance type can be a little bit overwhelming, log in to the console, look for instance capacity, etc


That's why AWS provides us a really useful tool from the cli, ec2-instance-selector (https://github.com/aws/amazon-ec2-instance-selector)


This makes our lives much easier. You just need to run the command passing resource criteria like vcpus, network performance, ram, etc.


Be sure to have your AWS credentials loaded when you run it.


""

➜ ec2-instance-selector --vcpus=2 --memory=4 --cpu-architecture=x86_64 --gpus=0

c5.large

c5a.large

c5ad.large

c5d.large

t2.medium

t3.medium

t3a.medium


There are lots of filters to use, check it out with --help:



➜ ec2-instance-selector --help

(...)

Usage:

ec2-instance-selector [flags]


Examples:

ec2-instance-selector --vcpus 4 --region us-east-2 --availability-zones us-east-2b

ec2-instance-selector --memory-min 4 --memory-max 8 --vcpus-min 4 --vcpus-max 8 --region us-east-2


Filter Flags:

--allow-list string List of allowed instance types to select from w/ regex syntax (Example: m[3-5]\.*)

-z, --availability-zones strings Availability zones or zone ids to check EC2 capacity offered in specific AZs

--baremetal Bare Metal instance types (.metal instances)

-b, --burst-support Burstable instance types

-a, --cpu-architecture string CPU architecture [x86_64/amd64, i386, or arm64]

--current-generation Current generation instance types (explicitly set this to false to not return current generation instance types)

--deny-list string List of instance types which should be excluded w/ regex syntax (Example: m[1-2]\.*)

-e, --ena-support Instance types where ENA is supported or required

-f, --fpga-support FPGA instance types

(...)


So stop wasting time looking for instance types and give this powerful tool a shot!




""




Leandro Mansilla

DevOps Engineer

Teracloud







If you want to know more about our services, tips, blogs, or a free assessment

email our team member ben@teracloud.io




Buscar por tags
bottom of page