(aws-scheduler-targets): Add containerOverrides to props of EcsRunFargateTask / EcsRunTask
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
I would like to specify `containerOverrides` in `props` of [EcsRunFargateTask](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_scheduler_targets.EcsRunFargateTask.html).
### Use Case
It allows the creation of multiple schedules with different arguments from a single task definition.
### Proposed Solution
Like [aws_stepfunctions_tasks.ContainerOverrides](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.ContainerOverrides.html)
```ts
import * as scheduler from 'aws-cdk-lib/aws-scheduler'
import * as schedulerTargets from 'aws-cdk-lib/aws-scheduler-targets'
new scheduler.Schedule(this, `${taskConfig.name}Schedule`, {
schedule: scheduler.ScheduleExpression.expression(taskConfig.scheduleExpression),
target: new schedulerTargets.EcsRunFargateTask(ecsCluster, {
taskDefinition,
containerOverrides: {command: [taskConfig.name]}
}),
})
```
### 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.1007.0 (build d3f6c3c)
### Environment details (OS name and version, etc.)
Mac
Contributor guide
Research direction
Start at the TypeScript implementations of EcsRunFargateTask and EcsRunTask, then compare the linked aws_stepfunctions_tasks.ContainerOverrides API and locate the existing scheduler-targets tests. Done means both target props support the requested containerOverrides shape, including the command example, with tests covering the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100