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.

Revisions

  1. crazygit created this gist Apr 14, 2017.
    3 changes: 3 additions & 0 deletions get_autosaling_name.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # 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)