tg_attr_deg_delay.sh

etc/scripts

·

1 min read

  • outline

Default value of default deregistration delay timeout of target group is 300 seconds. While waiting until 300 seconds, it causes two times of normal state. This value must be reduced as much as you can. Recommendation value is 30 seconds. Below script is for checking this value of existing target group.

#!/bin/bash
echo "ELB attributes"
for i in $(aws elbv2 describe-target-groups --query TargetGroups[].TargetGroupArn --output text)
        do
        echo $i
        aws elbv2 describe-target-group-attributes --target-group-arn $i --query 'Attributes[?Key==`deregistration_delay.timeout_seconds`].Value[]' 2>/dev/null
        done
echo "======================================================================================================================="