Skip to content

Instantly share code, notes, and snippets.

@bashtoni
Created December 28, 2013 08:41
Show Gist options
  • Save bashtoni/8157406 to your computer and use it in GitHub Desktop.
Save bashtoni/8157406 to your computer and use it in GitHub Desktop.
Find all EC2 instances created by a CloudFormation stack and print their IPs
aws ec2 describe-instances --filters Name=tag:aws:cloudformation:stack-name,Values=${STACKNAME} --output text --query 'Reservations[*].Instances[*].PrivateIpAddress'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment