Skip to content

Commit 840ec97

Browse files
authored
chore(ec2): add missing instance types (#29427)
### Issue # (if applicable) Closes #23854 ### Reason for this change Update the CDK EC2 instance class and size enums to match the current availability ### Description of changes Added the missing instance class and sizes ### Description of how you validated changes This was generated with the help of the same tool I used to create #29422, using the live SDK data to match against the CDK. For the instance types, I am using the `DescribeInstanceTypes` API command in multiple regions (`us-east-1`, `us-east-2`, `us-west-1`, `eu-west-1`.) As far as I could tell, the union of `us-east-1` and `us-east-2` cover all possible instance classes and sizes, but correct me if I'm wrong. As a sanity check, I'm also checking that the CDK does not have more instance types and sizes that the SDK does. It does vary between regions, but of note, there were: * `p4de`, in developer preview * `x2g`, RDS exclusive and not returned by `DescribeInstanceTypes` Finally, I am ignoring some of the previous generation instance classes missing from the CDK, as they are very outdated and weren't added in first place, i.e. `c1`, `t1`, `m1`, `m2`, and `i2`. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent bf33efd commit 840ec97

File tree

1 file changed

+98
-1
lines changed

1 file changed

+98
-1
lines changed

packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,36 @@ export enum InstanceClass {
11101110
*/
11111111
MAC1 = 'mac1',
11121112

1113+
/**
1114+
* Macintosh instances built on Apple Mac mini 2020 computers, 2nd generation with Apple silicon M1 processors
1115+
*/
1116+
MACINTOSH2_M1 = 'macintosh2-m1',
1117+
1118+
/**
1119+
* Macintosh instances built on Apple Mac mini 2020 computers, 2nd generation with Apple silicon M1 processors
1120+
*/
1121+
MAC2 = 'mac2',
1122+
1123+
/**
1124+
* Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 processors
1125+
*/
1126+
MACINTOSH2_M2 = 'macintosh2-m2',
1127+
1128+
/**
1129+
* Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 processors
1130+
*/
1131+
MAC2_M2 = 'mac2-m2',
1132+
1133+
/**
1134+
* Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 Pro processors
1135+
*/
1136+
MACINTOSH2_M2_PRO = 'macintosh2-m2-pro',
1137+
1138+
/**
1139+
* Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 Pro processors
1140+
*/
1141+
MAC2_M2PRO = 'mac2-m2pro',
1142+
11131143
/**
11141144
* Multi-stream video transcoding instances for resolutions up to 4K UHD, 1st generation
11151145
*/
@@ -1130,6 +1160,36 @@ export enum InstanceClass {
11301160
*/
11311161
HPC6A = 'hpc6a',
11321162

1163+
/**
1164+
* High performance computing with local NVME drive based on 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake), 6th generation
1165+
*/
1166+
HIGH_PERFORMANCE_COMPUTING6_INTEL_NVME_DRIVE = 'high-performance-computing6-intel-nvme-drive',
1167+
1168+
/**
1169+
* High performance computing with local NVME drive based on 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake), 6th generation
1170+
*/
1171+
HPC6ID = 'hpc6id',
1172+
1173+
/**
1174+
* High performance computing based on AMD EPYC, 7th generation
1175+
*/
1176+
HIGH_PERFORMANCE_COMPUTING7_AMD = 'high-performance-computing7-amd',
1177+
1178+
/**
1179+
* High performance computing based on AMD EPYC, 7th generation
1180+
*/
1181+
HPC7A = 'hpc7a',
1182+
1183+
/**
1184+
* High performance computing based on Graviton, 7th generation
1185+
*/
1186+
HIGH_PERFORMANCE_COMPUTING7_GRAVITON = 'high-performance-computing7-graviton',
1187+
1188+
/**
1189+
* High performance computing based on Graviton, 7th generation
1190+
*/
1191+
HPC7G = 'hpc7g',
1192+
11331193
/**
11341194
* Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation
11351195
*/
@@ -1261,14 +1321,39 @@ export enum InstanceSize {
12611321
XLARGE56 = '56xlarge',
12621322

12631323
/**
1264-
* Instance size XLARGE56 (112xlarge)
1324+
* Instance size XLARGE96 (96xlarge)
1325+
*/
1326+
XLARGE96 = '96xlarge',
1327+
1328+
/**
1329+
* Instance size XLARGE112 (112xlarge)
12651330
*/
12661331
XLARGE112 = '112xlarge',
12671332

12681333
/**
12691334
* Instance size METAL (metal)
12701335
*/
12711336
METAL = 'metal',
1337+
1338+
/**
1339+
* Instance size XLARGE16METAL (metal-16xl)
1340+
*/
1341+
XLARGE16METAL = 'metal-16xl',
1342+
1343+
/**
1344+
* Instance size XLARGE24METAL (metal-24xl)
1345+
*/
1346+
XLARGE24METAL = 'metal-24xl',
1347+
1348+
/**
1349+
* Instance size XLARGE32METAL (metal-32xl)
1350+
*/
1351+
XLARGE32METAL = 'metal-32xl',
1352+
1353+
/**
1354+
* Instance size XLARGE48METAL (metal-48xl)
1355+
*/
1356+
XLARGE48METAL = 'metal-48xl',
12721357
}
12731358

12741359
/**
@@ -1495,10 +1580,22 @@ export class InstanceType {
14951580
[InstanceClass.INF2]: 'inf2',
14961581
[InstanceClass.MACINTOSH1_INTEL]: 'mac1',
14971582
[InstanceClass.MAC1]: 'mac1',
1583+
[InstanceClass.MACINTOSH2_M1]: 'mac2',
1584+
[InstanceClass.MAC2]: 'mac2',
1585+
[InstanceClass.MACINTOSH2_M2]: 'mac2-m2',
1586+
[InstanceClass.MAC2_M2]: 'mac2-m2',
1587+
[InstanceClass.MACINTOSH2_M2_PRO]: 'mac2-m2pro',
1588+
[InstanceClass.MAC2_M2PRO]: 'mac2-m2pro',
14981589
[InstanceClass.VIDEO_TRANSCODING1]: 'vt1',
14991590
[InstanceClass.VT1]: 'vt1',
15001591
[InstanceClass.HIGH_PERFORMANCE_COMPUTING6_AMD]: 'hpc6a',
15011592
[InstanceClass.HPC6A]: 'hpc6a',
1593+
[InstanceClass.HIGH_PERFORMANCE_COMPUTING6_INTEL_NVME_DRIVE]: 'hpc6id',
1594+
[InstanceClass.HPC6ID]: 'hpc6id',
1595+
[InstanceClass.HIGH_PERFORMANCE_COMPUTING7_AMD]: 'hpc7a',
1596+
[InstanceClass.HPC7A]: 'hpc7a',
1597+
[InstanceClass.HIGH_PERFORMANCE_COMPUTING7_GRAVITON]: 'hpc7g',
1598+
[InstanceClass.HPC7G]: 'hpc7g',
15021599
[InstanceClass.I4I]: 'i4i',
15031600
[InstanceClass.IO4_INTEL]: 'i4i',
15041601
[InstanceClass.X2IEDN]: 'x2iedn',

0 commit comments

Comments
 (0)