Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Add Automatic Container Instance Draining during ASG Scale-Down Event #59

Merged
merged 17 commits into from
Mar 5, 2018
Merged

Add Automatic Container Instance Draining during ASG Scale-Down Event #59

merged 17 commits into from
Mar 5, 2018

Conversation

alpineElfFriend
Copy link

@alpineElfFriend alpineElfFriend commented Mar 1, 2018

New stack "LifecycleHook" (*must put lifecyclehook.yaml into S3 Bucket, to be available at https://s3.amazonaws.com/ecs-refarch-cloudformation/infrastructure/lifecyclehook.yaml)

Before a Container Instance in the Autoscaling Group is terminated (due to scale-in), it will enter Terminating:Wait lifecycle hook.

Lambda function will drain running Tasks from container Instances where possible, and send complete_lifecycle_action to ASG when no Tasks are running/pending on Instance.

@PaulMaddox
Copy link
Contributor

❤️ this! Awesome contribution.

@PaulMaddox PaulMaddox merged commit 5f2bf7e into aws-samples:master Mar 5, 2018
- LifecycleHandlerFunction
- Arn
Protocol: lambda
DependsOn: LifecycleHandlerFunction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that DependsOn necessary? I think the !GetAtt automatically creates a dependency?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants