Skip to content

Instantly share code, notes, and snippets.

@crazygit
Created April 14, 2017 06:54
Show Gist options
  • Save crazygit/aed48805982e54cdd42ff7e53bdd8139 to your computer and use it in GitHub Desktop.
Save crazygit/aed48805982e54cdd42ff7e53bdd8139 to your computer and use it in GitHub Desktop.
get aws ec2 autoscaling group name
# get current ec2 AutoScaling group name
# note: change region option as yours
aws autoscaling describe-auto-scaling-instances --region us-east-1 --output text --query=AutoScalingInstances[].AutoScalingGroupName --instance-ids=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment