aws-step-function-tasks: Allow removing launchType from RunEcsEc2Task
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
capacity providers allow using ECS with dynamic capacity. https://aws.amazon.com/tw/about-aws/whats-new/2019/12/amazon-ecs-capacity-providers-now-available/ , yet CloudFormation and CDK do not yet support this feature https://github.com/aws/aws-cdk/issues/5471.
I propose as a stop gap solution to allow users to submit EC2 tasks without `launchType`:
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-launchType
if `launchType` is provided, there is no way to get the task to use the capacity providers that are created outside CDK.
### Use Case
I want to create capacity providers using boto3 and use them when launching EC2 tasks using step functions.
### Proposed Solution
Provider a way to make `launchType` optional here:
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-ec2-task.ts#L62
Or to change it after construction.
### Other
* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start in packages/@aws-cdk/aws-stepfunctions-tasks/lib/ecs/run-ecs-ec2-task.ts at the RunEcsEc2Task definition and trace how launchType is configured. Done means EC2 tasks can be submitted without launchType for externally created capacity providers while existing explicit launchType behavior remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100