aws-ecs-patterns: Support setting EcsParameters for a scheduled task.
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Allow other ECS parameters to be set on the Event Bridge rule as part of creating a scheduled EC2 or Fargate task.
The CDK only sets a limited range of ECS parameters on the Event Bridge rule it created to implement the schedule.
* launchType
* platformVersion
* networkConfiguration
* taskCount
* taskDefinitionArn
### Use Case
* Define a `CapacityProviderStrategy` to run scheduled background tasks using Fargate Spot.
* Set `EnableExecuteCommand` to help in supporting executing scheduled tasks, particularly in triaging borked executions.
* Set `EnableECSManagedTags` to set the `aws:ecs:clusterName` tag for billing.
* Adding custom tags via `TagList`.
### Proposed Solution
_No response_
### Other Information
#### CloudFormation documentation
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html
#### Call path
This is the call path used to establish the additional parameters on the EventBridge rule target.
1. `ScheduledFargateTask.constructor`
2. `ScheduledTaskBase.addTaskAsTarget`
3. `events.Rule.addTarget`
4. `eventTargets.ECSTask.bind`
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.73.0
### Environment details (OS name and version, etc.)
macos/13.3 (aarch64) nodejs/18.15.0 typescript/5.0.4
Contributor guide
Research direction
Start at ScheduledFargateTask.constructor and follow the stated path through ScheduledTaskBase.addTaskAsTarget, events.Rule.addTarget, and eventTargets.ECSTask.bind. Compare the supported ECS parameters with the CloudFormation EcsParameters documentation and define how the additional parameters should be exposed for scheduled EC2 and Fargate tasks; done means those requested settings, including capacity providers, execute command, managed tags, and custom tags, can be configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100