EKS: `LaunchTemplateSpotOptions` are not supported while create=ing EKS Managed Node Groups with a Launch Template.
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
Trying to create an EKS Managed Node Group with a Launch Template using CDK EKS/EC2 module with following spot options.
const launchTemplateSpotOptions: ec2.LaunchTemplateSpotOptions = {
blockDuration: cdk.Duration.hours(1),
interruptionBehavior: ec2.SpotInstanceInterruption.STOP,
maxPrice: 10,
requestType: ec2.SpotRequestType.ONE_TIME,
validUntil: cdk.Expiration.after(cdk.Duration.days(90))
};
EKS Managed Nodegroup creation fails with following error :
```
7:02:50 PM | CREATE_FAILED | AWS::EKS::Nodegroup | blueprintconstruct...templatengECF74DC1
Resource handler returned message: "Instance market options are not supported with the launch template. (Service: Eks, St
atus Code: 400, Request ID: 2bc085ab-99cd-4486-9f9b-b42153b76d3a)" (RequestToken: a323e32a-614f-6a62-f4ee-01a952674903, H
andlerErrorCode: InvalidRequest)
```
This clearly shows that NodeGroup creation of EKS wont support Launch template with spot options.
### Expected Behavior
EKS Managed Node group creation to support Launch template with Spot options with CDK.
### Current Behavior
EKS Managed Nodegroup creation fails with following error :
```
7:02:50 PM | CREATE_FAILED | AWS::EKS::Nodegroup | blueprintconstruct...templatengECF74DC1
Resource handler returned message: "Instance market options are not supported with the launch template. (Service: Eks, St
atus Code: 400, Request ID: 2bc085ab-99cd-4486-9f9b-b42153b76d3a)" (RequestToken: a323e32a-614f-6a62-f4ee-01a952674903, H
andlerErrorCode: InvalidRequest)
```
### Reproduction Steps
Try to create a Launch template with following options and use the same while creating EKS Node Group.
const launchTemplateSpotOptions: ec2.LaunchTemplateSpotOptions = {
blockDuration: cdk.Duration.hours(1),
interruptionBehavior: ec2.SpotInstanceInterruption.STOP,
maxPrice: 10,
requestType: ec2.SpotRequestType.ONE_TIME,
validUntil: cdk.Expiration.after(cdk.Duration.days(90))
};
### Possible Solution
Adding support for EKS Managed Node group creation to support Launch template with Spot options with CDK.
### Additional Information/Context
_No response_
### CDK CLI Version
2.67
### Framework Version
_No response_
### Node.js Version
v19.6.1
### OS
Mac/Ubuntu
### Language
Typescript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start by reproducing the provided TypeScript configuration and verify the AWS EKS error for launch-template spot options. The issue names no repository files or tests, so locate the EKS managed node group and EC2 launch template integration points before determining whether the requested combination can be supported. Done would mean successful node group creation with these options, or a documented limitation if AWS rejects the combination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100