-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Describe the bug
As a AWS CDK user for EKS, I want build out a managed node group with a mix of G5/G6/G6e instance types.
This is not possible with the current isGpuInstanceType check for managed node groups (here | architecture mapping here). When I specify instance types of both G5 and G6, I receive an error of instanceTypes of different architectures is not allowed due to G6/G6e not existing in the knownGpuInstanceTypes.
Additionally, there is currently no instance class setup currently in the EC2 package for G6e instances: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
I expect to be able to build a managed node group with both G5/G6/G6e instance classes due to the architectures being compatible.
Current Behavior
The error 'instanceTypes of different architectures is not allowed is being thrown.
I cannot reference a G6e instance class.
Reproduction Steps
Create a managed node group with instance types from a mix of G5/G6 instance families and will see the error above.
Try to reference the G6e instance class - it does not exist.
Possible Solution
To fix the G5/G6 issue:
- Add
InstanceClass.G6to the list ofknowGpuInstanceTypes: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts#L607
To enable G6e instance types and get those compatible as recognized GPU instance types:
- Setup a new InstanceClass of G6E for EC2: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts
- Use that to add
InstanceClass.G6Eto the list ofknowGpuInstanceTypes: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts#L607
Additional Information/Context
Happy to open a PR to handle this - just wanted to get the discussion going
CDK CLI Version
2.156.0
Framework Version
No response
Node.js Version
20.17.0
OS
macOS 14.6.1
Language
TypeScript
Language Version
Version 5.5.4
Other information
No response