Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ec2): Add support for P5 instances EC2 #27705

Merged
merged 8 commits into from
Nov 2, 2023
12 changes: 12 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 @@ -880,6 +880,16 @@ export enum InstanceClass {
*/
P4D = 'p4d',

/**
* Parallel-processing optimized instances, 5th generation
*/
PARALLEL5 = 'parallel5',

/**
* Parallel-processing optimized instances, 5th generation
*/
P5 = 'p5',

/**
* Arm processor based instances, 1st generation
*/
Expand Down Expand Up @@ -1391,6 +1401,8 @@ export class InstanceType {
[InstanceClass.P4DE]: 'p4de',
[InstanceClass.PARALLEL4]: 'p4d',
[InstanceClass.P4D]: 'p4d',
[InstanceClass.PARALLEL5]: 'p5',
[InstanceClass.P5]: 'p5',
[InstanceClass.ARM1]: 'a1',
[InstanceClass.A1]: 'a1',
[InstanceClass.STANDARD6_GRAVITON]: 'm6g',
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 @@ -119,7 +119,7 @@ describe('instance', () => {
});
test('instance architecture is correctly discerned for x86-64 instance', () => {
// GIVEN
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'p4de']; // A sample of x86-64 instance classes
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'p4de', 'p5']; // A sample of x86-64 instance classes

for (const instanceClass of sampleInstanceClasses) {
// WHEN
Expand Down