Skip to content

Commit

Permalink
feat(ec2): add P4DE instances (in developer preview) (#21590)
Browse files Browse the repository at this point in the history
Add support for P4DE instances.

[Announcement](https://aws.amazon.com/about-aws/whats-new/2022/05/amazon-ec2-p4de-gpu-instances-ml-training-hpc/)

Closes #20924.

Note: This instance type is still in developer preview. As proposed in #20924 (comment), I described this restriction in the docstring.

Please add tags `pr-linter/exempt-readme` and `pr-linter/exempt-integ-test`.

----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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 committed Aug 15, 2022
1 parent ea11f33 commit 0c654e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/@aws-cdk/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,17 @@ export enum InstanceClass {
*/
P3DN = 'p3dn',


/**
* Parallel-processing optimized instances with local NVME drive, extended, 4th generation (in developer preview)
*/
PARALLEL4_NVME_DRIVE_EXTENDED = 'parallel4-nvme-drive-extended',

/**
* Parallel-processing optimized instances with local NVME drive, extended, 4th generation (in developer preview)
*/
P4DE = 'p4de',

/**
* Parallel-processing optimized instances, 4th generation
*/
Expand Down Expand Up @@ -1171,6 +1182,8 @@ export class InstanceType {
[InstanceClass.P3]: 'p3',
[InstanceClass.PARALLEL3_NVME_DRIVE_HIGH_PERFORMANCE]: 'p3dn',
[InstanceClass.P3DN]: 'p3dn',
[InstanceClass.PARALLEL4_NVME_DRIVE_EXTENDED]: 'p4de',
[InstanceClass.P4DE]: 'p4de',
[InstanceClass.PARALLEL4]: 'p4d',
[InstanceClass.P4D]: 'p4d',
[InstanceClass.ARM1]: 'a1',
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 @@ -120,7 +120,7 @@ describe('instance', () => {
});
test('instance architecture is correctly discerned for x86-64 instance', () => {
// GIVEN
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a']; // A sample of x86-64 instance classes
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a', 'p4de']; // A sample of x86-64 instance classes

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

0 comments on commit 0c654e9

Please sign in to comment.