Skip to content

Instantly share code, notes, and snippets.

@tmtk75
Last active January 2, 2016 10:59
Show Gist options
  • Select an option

  • Save tmtk75/8293645 to your computer and use it in GitHub Desktop.

Select an option

Save tmtk75/8293645 to your computer and use it in GitHub Desktop.
List all EC2 running instances filtered with security group id
aws ec2 describe-instances --filter "Name=group-id,Values=sg-d1235xxx" "Name=instance-state-name,Values=running" | jq ".[]|length"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment