Last active
October 8, 2018 10:19
-
-
Save wellsie/e0d4acac1c7c6d4d9edfaf52ced5d6c8 to your computer and use it in GitHub Desktop.
Autoscaling group ip addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GROUP=worker | |
IDS=$(aws autoscaling describe-auto-scaling-groups \ | |
--auto-scaling-group-name $GROUP \ | |
--query AutoScalingGroups[].Instances[].InstanceId \ | |
--output text) | |
aws ec2 describe-instances \ | |
--instance-ids $IDS \ | |
--query Reservations[].Instances[].PrivateIpAddress \ | |
--output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment