Skip to content

Instantly share code, notes, and snippets.

@dazza-codes
Created December 6, 2022 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dazza-codes/654ad4b884dd0051b0151b1a0cfaa837 to your computer and use it in GitHub Desktop.
Save dazza-codes/654ad4b884dd0051b0151b1a0cfaa837 to your computer and use it in GitHub Desktop.
AWS VPC Checks
#!/usr/bin/env bash
vpc="$VPC_ID"
region="$AWS_DEFAULT_REGION"
aws ec2 describe-vpc-peering-connections --region $region --filters 'Name=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId
aws ec2 describe-nat-gateways --region $region --filter 'Name=vpc-id,Values='$vpc | grep NatGatewayId
aws ec2 describe-instances --region $region --filters 'Name=vpc-id,Values='$vpc | grep InstanceId
aws ec2 describe-vpn-gateways --region $region --filters 'Name=attachment.vpc-id,Values='$vpc | grep VpnGatewayId
aws ec2 describe-network-interfaces --region $region --filters 'Name=vpc-id,Values='$vpc | grep NetworkInterfaceId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment