aws-eks: Support CUSTOM
AMI type on Nodegroups
#30641
Labels
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
CloudFormation supports passing
CUSTOM
as value forAmiType
: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-amitypeThis is not available in CDK, making the use of custom AMIs impossible.
Use Case
When building custom AMIs for a cluster (e.g. based on the EKS optimized images) you should be able to use them.
Proposed Solution
Rough idea:
CUSTOM
type to the enum:aws-cdk/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts
Line 29 in 3b95777
aws-cdk/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts
Line 635 in 3b95777
CUSTOM
as the last option for all architecturesIt looks like this should already be enough, but I didn't actually attempt doing this.
Other Information
I tried forcing the issue by bypassing TypeScript checks:
amiType: ('CUSTOM' as any)
- internal check rejected it. After investigating a little - theNodegroup
constructor tries to do the right thing and validates the value, but completely ignores the existence ofCUSTOM
in CloudFormation.Acknowledgements
CDK version used
2.133.0
Environment details (OS name and version, etc.)
Ubuntu 22.04.4 LTS
The text was updated successfully, but these errors were encountered: