aws / aws/aws-cdk

aws_ecs: allow to specify kernel when creating the ecsOptimizedImage

Open
#29,800 3 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-ecs effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

### Describe the feature

Current CDK api does not allow to specify the kernel version, and you end up with 4.14 which is marked as EOL Jan 2024.

This page says 4.14 has reached EOL: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html

API link: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.EcsOptimizedImage.html

It would help if:
* default kernel is the recommended kernel
* it could be passed like in this construct: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2Kernel.html
* create the AMI id using https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2ImageSsmParameter.html

### Use Case

I want to create an ECS autoscaling group with the recommended kernel or using another supported ami from the ECS optimized image.

### Proposed Solution

Option 1: update the api to use the recommended kernel version (5.10)
Option 2: allow users to pass the kernel version to use, as the AMI exists.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.137.0

### Environment details (OS name and version, etc.)

AL2

Contributor guide

Open the contributing guide

Research direction

Start with the EcsOptimizedImage API and compare its behavior with AmazonLinux2Kernel and AmazonLinux2ImageSsmParameter. Check the ECS optimized AMI documentation for supported kernels and current recommendations. Done means the default uses the recommended kernel and users can select another supported kernel while receiving the corresponding AMI ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.