It 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 - the Nodegroup constructor tries to do the right thing and validates the value, but completely ignores the existence of CUSTOM in CloudFormation.
Acknowledgements
[X] I may be able to implement this feature request
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: https://github.com/aws/aws-cdk/blob/3b95777ee5dae32fd41481d81922d07c804a2c6b/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts#L29CUSTOM
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