Skip to content

Commit

Permalink
Merge pull request #707 from envato/make-terminate-instance-exit-grac…
Browse files Browse the repository at this point in the history
…efully

Ensure terminate instance exits gracefully
  • Loading branch information
yob authored Sep 16, 2020
2 parents 9a19797 + 623bb77 commit c7b586a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -euo pipefail
instance_id=$(curl -fsSL http://169.254.169.254/latest/meta-data/instance-id)
region=$(curl -fsSL http://169.254.169.254/latest/meta-data/placement/availability-zone | head -c -1)

aws autoscaling terminate-instance-in-auto-scaling-group --region "$region" --instance-id "$instance_id" "--should-decrement-desired-capacity"
aws autoscaling terminate-instance-in-auto-scaling-group --region "$region" --instance-id "$instance_id" "--should-decrement-desired-capacity" || true

0 comments on commit c7b586a

Please sign in to comment.