-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
Work to support L2 constructs for AWS Scheduler is in progress (#23394). See the approved RFC. RFC planned to add 12 templates targets, but only Lambda Invoke is currently implemented (#26575).
This issue tracks implementation of EcsRunTask target to start a task on an Amazon ECS Cluster.
Use Case
Customers would like to use templated target EcsRunTask to be able to start a ECS Task on schedule. L2 target construct should grant required permissions to the AWS Scheduler to start tasks on a ECS Cluster.
Proposed Solution
The proposed solution needs to be adopted to the recent examples of LambdaInvoke (https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-scheduler-targets-alpha/lib/lambda-invoke.ts).
Solution should also include unit and integration tests.
Class EcsRunTask should:
- Grant Scheduler Execution Role permissions to start a task via
addTargetActionToRole - Override
bindBaseTargetConfigto returnecsParametersas part ofScheduleTargetConfig.
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.99.1
Environment details (OS name and version, etc.)
MacOS