Skip to content

Instantly share code, notes, and snippets.

@sirhopcount
Forked from wellsie/asg-ips.sh
Created October 8, 2018 10:19
Show Gist options
  • Save sirhopcount/096a91f6a61214ba9f4fd60453305c78 to your computer and use it in GitHub Desktop.
Save sirhopcount/096a91f6a61214ba9f4fd60453305c78 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