-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ecs: support container definition's restart policy #31127
Description
Describe the feature
Amazon Elastic Container Services (Amazon ECS) now improves container resiliency by giving you the ability to define a flexible container restart policy for restarting individual containers locally, without requiring a full task relaunch. With local container restarts, Amazon ECS can recover your containers from unexpected failures within a few seconds, enhancing your overall task stability by avoiding unnecessary task relaunches.
https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-ecs-restart-containers-task-relaunch/
Use Case
automated container restarts in-place to recover your containers from transient failures such as network disruption or cases where your containers stop unexpectedly
Proposed Solution
Restart policy configuration is added to container definition in task definition. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_restart_policy
Apparently CFn still does not support it yet though. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html Maybe they are just updating docs?
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.152.0
Environment details (OS name and version, etc.)
macOS