Skip to content

Commit

Permalink
chore(ec2): add M7g and R7g instances (#24450)
Browse files Browse the repository at this point in the history
Support new M7g and R7g instances.

[Announcement](https://aws.amazon.com/about-aws/whats-new/2023/02/amazon-ec2-m7g-r7g-instances/)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
jumic authored Mar 28, 2023
1 parent 5b5c36f commit d8a80b4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions packages/@aws-cdk/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,20 @@ export enum InstanceClass {
*/
R6GD = 'r6gd',

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

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

/**
* Compute optimized instances, 3rd generation
*/
Expand Down Expand Up @@ -836,6 +850,20 @@ export enum InstanceClass {
*/
M6GD = 'm6gd',

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

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

/**
* High memory and compute capacity instances, 1st generation
*/
Expand Down Expand Up @@ -1103,6 +1131,8 @@ export class InstanceType {
[InstanceClass.R6G]: 'r6g',
[InstanceClass.MEMORY6_GRAVITON2_NVME_DRIVE]: 'r6gd',
[InstanceClass.R6GD]: 'r6gd',
[InstanceClass.MEMORY7_GRAVITON]: 'r7g',
[InstanceClass.R7G]: 'r7g',
[InstanceClass.COMPUTE3]: 'c3',
[InstanceClass.C3]: 'c3',
[InstanceClass.COMPUTE4]: 'c4',
Expand Down Expand Up @@ -1201,6 +1231,8 @@ export class InstanceType {
[InstanceClass.M6A]: 'm6a',
[InstanceClass.STANDARD6_GRAVITON2_NVME_DRIVE]: 'm6gd',
[InstanceClass.M6GD]: 'm6gd',
[InstanceClass.STANDARD7_GRAVITON]: 'm7g',
[InstanceClass.M7G]: 'm7g',
[InstanceClass.HIGH_COMPUTE_MEMORY1]: 'z1d',
[InstanceClass.Z1D]: 'z1d',
[InstanceClass.INFERENCE1]: 'inf1',
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/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', 'r6g', 'r6gd', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes
'a1', 't4g', 'c6g', 'c7g', 'c6gd', 'c6gn', 'm6g', 'm6gd', 'm7g', 'r6g', 'r6gd', 'r7g', 'g5g', 'im4gn', 'is4gen', // current Graviton-based instance classes
'a13', 't11g', 'y10ng', 'z11ngd', // theoretical future Graviton-based instance classes
];

Expand Down

0 comments on commit d8a80b4

Please sign in to comment.