Skip to content

Commit

Permalink
feat(ec2): add r7gd, m7gd, c7gd instance types
Browse files Browse the repository at this point in the history
The instance type enum and map currently exclude the x7GD subfamily of instance types.
  • Loading branch information
funguy-tech committed Aug 16, 2023
1 parent b23252b commit 4707c8b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,20 @@ export enum InstanceClass {
*/
R7G = 'r7g',

/**
* Memory optimized instances, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
MEMORY7_GRAVITON3_NVME_DRIVE = 'memory7-graviton3-nvme-drive',

/**
* Memory optimized instances, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
R7GD = 'r7gd',

/**
* Compute optimized instances, 3rd generation
*/
Expand Down Expand Up @@ -454,6 +468,20 @@ export enum InstanceClass {
*/
C6GD = 'c6gd',

/**
* Compute optimized instances for high performance computing, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
COMPUTE7_GRAVITON3_NVME_DRIVE = 'compute7-graviton3-nvme-drive',

/**
* Compute optimized instances for high performance computing, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
C7GD = 'c7gd',

/**
* Compute optimized instances for high performance computing, 6th generation with Graviton2 processors
* and high network bandwidth capabilities
Expand Down Expand Up @@ -864,6 +892,20 @@ export enum InstanceClass {
*/
M7G = 'm7g',

/**
* Standard instances, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
STANDARD7_GRAVITON3_NVME_DRIVE = 'standard7-graviton3-nvme-drive',

/**
* Standard instances, 7th generation with Graviton3 processors and local NVME drive
*
* This instance class is currently only available in US East (Ohio), US East (N. Virginia), US West (Oregon), and Europe (Ireland).
*/
M7GD = 'm7gd',

/**
* High memory and compute capacity instances, 1st generation
*/
Expand Down Expand Up @@ -1143,6 +1185,8 @@ export class InstanceType {
[InstanceClass.R6GD]: 'r6gd',
[InstanceClass.MEMORY7_GRAVITON]: 'r7g',
[InstanceClass.R7G]: 'r7g',
[InstanceClass.MEMORY7_GRAVITON3_NVME_DRIVE]: 'r7gd',
[InstanceClass.R7GD]: 'r7gd',
[InstanceClass.COMPUTE3]: 'c3',
[InstanceClass.C3]: 'c3',
[InstanceClass.COMPUTE4]: 'c4',
Expand Down Expand Up @@ -1173,6 +1217,8 @@ export class InstanceType {
[InstanceClass.C6GN]: 'c6gn',
[InstanceClass.COMPUTE7_GRAVITON3]: 'c7g',
[InstanceClass.C7G]: 'c7g',
[InstanceClass.COMPUTE7_GRAVITON3_NVME_DRIVE]: 'c7gd',
[InstanceClass.C7GD]: 'c7gd',
[InstanceClass.STORAGE2]: 'd2',
[InstanceClass.D2]: 'd2',
[InstanceClass.STORAGE3]: 'd3',
Expand Down Expand Up @@ -1243,6 +1289,8 @@ export class InstanceType {
[InstanceClass.M6GD]: 'm6gd',
[InstanceClass.STANDARD7_GRAVITON]: 'm7g',
[InstanceClass.M7G]: 'm7g',
[InstanceClass.STANDARD7_GRAVITON3_NVME_DRIVE]: 'm7gd',
[InstanceClass.M7GD]: 'm7gd',
[InstanceClass.HIGH_COMPUTE_MEMORY1]: 'z1d',
[InstanceClass.Z1D]: 'z1d',
[InstanceClass.INFERENCE1]: 'inf1',
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ec2/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('instance', () => {
test('instance architecture is correctly discerned for arm instances', () => {
// GIVEN
const sampleInstanceClasses = [
'a1', 't4g', 'c6g', 'c7g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'm7g', 'r6g', 'r6gd', 'r7g', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes
'a1', 't4g', 'c6g', 'c7g', 'c6gd', 'c6gn', 'c7g', 'c7gd', 'm6g', 'm6gd', 'm7g', 'm7gd', 'r6g', 'r6gd', 'r7g', 'r7gd', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes
'a13', 't11g', 'y10ng', 'z11ngd', // theoretical future Graviton-based instance classes
];

Expand Down

0 comments on commit 4707c8b

Please sign in to comment.