A Python CLI tool for finding unused CIDR blocks in AWS VPCs

Overview

aws-cidr-finder is a Python CLI tool which finds unused CIDR blocks (IPv4 only currently) in your
AWS VPCs and outputs them to STDOUT. It is very simple, but can be quite useful for users who manage
many subnets across one or more VPCs.

Use aws-cidr-finder -h to see command options.

An Example

It is easiest to see the value of this tool through an example. Pretend that we have the following
VPC setup in AWS:

  • A VPC whose CIDR is 172.31.0.0/16, with a Name tag of Hello World
  • Six subnets in that VPC whose CIDRs are:
    • 172.31.0.0/20
    • 172.31.16.0/20
    • 172.31.32.0/20
    • 172.31.48.0/20
    • 172.31.64.0/20
    • 172.31.80.0/20

aws-cidr-finder allows you to quickly compute the CIDRs that you still have available in the VPC
without having to do a lot of annoying/tedious octet math. If we issue

 

 

 

To finish reading, please visit source site