Skip to content

Instantly share code, notes, and snippets.

@wellsie
Last active October 8, 2018 10:19
Show Gist options
  • Save wellsie/e0d4acac1c7c6d4d9edfaf52ced5d6c8 to your computer and use it in GitHub Desktop.
Save wellsie/e0d4acac1c7c6d4d9edfaf52ced5d6c8 to your computer and use it in GitHub Desktop.
Autoscaling group ip addresses
#!/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