Skip to content

Commit

Permalink
fix(ec2): memory optimised graviton2 instance type (#10615)
Browse files Browse the repository at this point in the history
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
ScOut3R authored Oct 5, 2020
1 parent 7178374 commit a72cfbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ export enum InstanceClass {
*/
R5AD = 'r5a',

/**
* Memory optimized instances, 6th generation with Graviton2 processors
*/
MEMORY6_GRAVITON = 'r6g',

/**
* Memory optimized instances, 6th generation with Graviton2 processors
*/
R6G = 'r6g',

/**
* Compute optimized instances, 3rd generation
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-ec2/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ nodeunitShim({
new Instance(stack, 'Instance', {
vpc,
machineImage: new AmazonLinuxImage(),
instanceType: InstanceType.of(InstanceClass.COMPUTE6_GRAVITON2, InstanceSize.LARGE),
instanceType: InstanceType.of(InstanceClass.MEMORY6_GRAVITON, InstanceSize.LARGE),
});

// THEN
cdkExpect(stack).to(haveResource('AWS::EC2::Instance', {
InstanceType: 'c6g.large',
InstanceType: 'r6g.large',
}));

test.done();
Expand Down

0 comments on commit a72cfbd

Please sign in to comment.