Skip to content

Commit 98e9fbe

Browse files
authored
chore(ec2): dl2q instance type, IntanceType fixes (#29481)
### Issue # (if applicable) None ### Reason for this change Follow up to #29427. Added a missing instance type, and minor fixes to the `IntanceType` class ### Description of changes I'd missed an instance type, [`dl2q`](https://aws.amazon.com/ec2/instance-types/dl2q/), which was neither in `us-east-1` or `us-east-2`, but in `us-west-2`. I've also added a couple of missing symbolic names, as well as fixed some differing comments between the key and its symbolic value (e.g. `M3` and `STANDARD3`) I also re-ordered a couple of enum values, when the symbolic value was separated from its match ### Description of how you validated changes Compared the CDK to the SDK to find the missing instance. Programmatically iterated over the comments of `IntanceType` to make sure the comments of the symbolic keys matched the one below. ### 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 ab94070 commit 98e9fbe

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

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

+36-12
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ export enum InstanceClass {
223223
*/
224224
MEMORY5_AMD_NVME_DRIVE = 'memory5-amd-nvme-drive',
225225

226+
/**
227+
* Memory optimized instances based on AMD EPYC with local NVME drive, 5th generation
228+
*/
229+
R5AD = 'r5ad',
230+
226231
/**
227232
* High memory instances (3TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation
228233
*/
@@ -283,11 +288,6 @@ export enum InstanceClass {
283288
*/
284289
U_24TB1 = 'u-24tb1',
285290

286-
/**
287-
* Memory optimized instances based on AMD EPYC with local NVME drive, 5th generation
288-
*/
289-
R5AD = 'r5ad',
290-
291291
/**
292292
* Memory optimized instances that are also EBS-optimized, 5th generation
293293
*/
@@ -611,20 +611,30 @@ export enum InstanceClass {
611611
*/
612612
STORAGE_COMPUTE_1 = 'storage-compute-1',
613613

614+
/**
615+
* Storage/compute balanced instances, 1st generation
616+
*/
617+
H1 = 'h1',
618+
614619
/**
615620
* High performance computing powered by AWS Trainium
616621
*/
617-
TRN1 = 'trn1',
622+
TRAINING_ACCELERATOR1 = 'training-accelerator1',
618623

619624
/**
620625
* High performance computing powered by AWS Trainium
621626
*/
622-
TRN1N = 'trn1n',
627+
TRN1 = 'trn1',
623628

624629
/**
625-
* Storage/compute balanced instances, 1st generation
630+
* Network-optimized high performance computing powered by AWS Trainium
626631
*/
627-
H1 = 'h1',
632+
TRAINING_ACCELERATOR1_ENHANCED_NETWORK = 'training-accelerator1-enhanced-network',
633+
634+
/**
635+
* Network-optimized high performance computing powered by AWS Trainium
636+
*/
637+
TRN1N = 'trn1n',
628638

629639
/**
630640
* I/O-optimized instances, 3rd generation
@@ -742,7 +752,7 @@ export enum InstanceClass {
742752
MEMORY_INTENSIVE_1_EXTENDED = 'memory-intensive-1-extended',
743753

744754
/**
745-
* Memory-intensive instances, 1st generation
755+
* Memory-intensive instances, extended, 1st generation
746756
*/
747757
X1E = 'x1e',
748758

@@ -881,7 +891,7 @@ export enum InstanceClass {
881891
P2 = 'p2',
882892

883893
/**
884-
* Parallel-processing optimized instances, 3nd generation
894+
* Parallel-processing optimized instances, 3rd generation
885895
*/
886896
PARALLEL3 = 'parallel3',
887897

@@ -891,7 +901,7 @@ export enum InstanceClass {
891901
P3 = 'p3',
892902

893903
/**
894-
* Parallel-processing optimized instances with local NVME drive for high performance computing, 3nd generation
904+
* Parallel-processing optimized instances with local NVME drive for high performance computing, 3rd generation
895905
*/
896906
PARALLEL3_NVME_DRIVE_HIGH_PERFORMANCE = 'parallel3-nvme-drive-high-performance',
897907

@@ -1199,6 +1209,16 @@ export enum InstanceClass {
11991209
* Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation
12001210
*/
12011211
DL1 = 'dl1',
1212+
1213+
/**
1214+
* Deep learning instances powered by Qualcomm AI 100 Standard accelerators, 2nd generation
1215+
*/
1216+
DEEP_LEARNING2_QUALCOMM = 'deep-learning2-qualcomm',
1217+
1218+
/**
1219+
* Deep learning instances powered by Qualcomm AI 100 Standard accelerators, 2nd generation
1220+
*/
1221+
DL2Q = 'dl2q',
12021222
}
12031223

12041224
/**
@@ -1490,7 +1510,9 @@ export class InstanceType {
14901510
[InstanceClass.D3]: 'd3',
14911511
[InstanceClass.STORAGE3_ENHANCED_NETWORK]: 'd3en',
14921512
[InstanceClass.D3EN]: 'd3en',
1513+
[InstanceClass.TRAINING_ACCELERATOR1]: 'trn1',
14931514
[InstanceClass.TRN1]: 'trn1',
1515+
[InstanceClass.TRAINING_ACCELERATOR1_ENHANCED_NETWORK]: 'trn1n',
14941516
[InstanceClass.TRN1N]: 'trn1n',
14951517
[InstanceClass.STORAGE_COMPUTE_1]: 'h1',
14961518
[InstanceClass.H1]: 'h1',
@@ -1606,6 +1628,8 @@ export class InstanceType {
16061628
[InstanceClass.MEMORY_INTENSIVE_2_XTZ_INTEL]: 'x2iezn',
16071629
[InstanceClass.DEEP_LEARNING1]: 'dl1',
16081630
[InstanceClass.DL1]: 'dl1',
1631+
[InstanceClass.DEEP_LEARNING2_QUALCOMM]: 'dl2q',
1632+
[InstanceClass.DL2Q]: 'dl2q',
16091633
};
16101634
return new InstanceType(`${instanceClassMap[instanceClass] ?? instanceClass}.${instanceSize}`);
16111635
}

0 commit comments

Comments
 (0)