74
75
# We don't have any way to know for sure what zones or instance-types are
75
76
# actually available in the current region, hence not named _"VALID"_EC2_*
76
77
_PLAUSIBLE_EC2_ZONES = ascii_lowercase
79
# cost is measured in $/h in us-east-1
80
_InstanceType = namedtuple("_InstanceType", "arch cpu mem cost")
82
# t1.micro can be i386 or amd64, and this needs special handling; however,
83
# it doesn't seem worthwhile to add custom code for handling non-overlap
84
# of arch when there's already a mechanism for specifying the desired arch
85
# for a t1.micro (cpu=0 mem=0 arch=<whatever>).
86
EC2_T1_MICRO_ARCH = "?"
88
EC2_INSTANCE_TYPES = {
89
# t1.micro cpu is "up to 2", but in practice "very little"
90
"t1.micro": _InstanceType(EC2_T1_MICRO_ARCH, 0.1, 613, 0.02),
92
"m1.small": _InstanceType("i386", 1, 1740, 0.085),
93
"m1.large": _InstanceType("amd64", 4, 7680, 0.34),
94
"m1.xlarge": _InstanceType("amd64", 8, 15360, 0.68),
96
"m2.xlarge": _InstanceType("amd64", 6.5, 17510, 0.5),
97
"m2.2xlarge": _InstanceType("amd64", 13, 35020, 1),
98
"m2.4xlarge": _InstanceType("amd64", 26, 70040, 2),
100
"c1.medium": _InstanceType("i386", 5, 1740, 0.17),
101
"c1.xlarge": _InstanceType("amd64", 20, 7168, 0.68),
103
"cc1.4xlarge": _InstanceType("amd64", 33.5, 23552, 1.3),
104
"cc2.8xlarge": _InstanceType("amd64", 88, 61952, 2.4),
106
# also has fancy GPUs we can't currently describe
107
"cg1.4xlarge": _InstanceType("amd64", 33.5, 22528, 2.1)}
77
109
_PLAUSIBLE_EC2_INSTANCE_TYPES = (
78
110
"t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge",
79
111
"m2.4xlarge", "c1.medium", "c1.xlarge", "cc1.4xlarge", "cc1.8xlarge",