Skip to content

Instantly share code, notes, and snippets.

@mjaromi
Created February 18, 2021 12:28
Show Gist options
  • Save mjaromi/90428b8c9d734488bac1b0270e2b7255 to your computer and use it in GitHub Desktop.
Save mjaromi/90428b8c9d734488bac1b0270e2b7255 to your computer and use it in GitHub Desktop.
Shows private subnets for provided VPC ID
aws ec2 describe-subnets --filter Name=vpc-id,Values=vpc-1234567890 --query 'Subnets[?MapPublicIpOnLaunch==`false`].SubnetId'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment