AWS EC2 inventory report generator

less than 1 minute read

Python script to generate a XLSX report containing all EC2 instances in AWS account. Paginating technique has been used for getting EC2 Instances to make sure we receive all AWS resources.

Download

Generated report has the following table header:

  • Placement
  • Name
  • Instance ID
  • Instance Type
  • Platform
  • Public IP
  • Private IP
  • Instance State
  • LaunchTime
  • AWS Account
  • CPU
  • CPU Utilization Avg
  • ECU
  • memory GiB
  • Volume
  • Size GiB
  • Volume
  • Size GiB
  • Volume
  • Size GiB
  • Volume
  • Size GiB
  • Volume

Prerequisites:

$ pip install openpyxl boto3
price.json file ( can be regenerated using python ec2-inventory-pricing-runfirst.py)

Run via Python:

$ python inventory.py AWS-profile-name

Leave a Comment