Python tool to inventory AWS resources (EC2 for now) and generate an HTML report with tabs per region and service.
- Collects EC2 inventory per region:
- VPCs, Subnets, Internet Gateways
- EC2 Instances with names, IDs, type, state, private/public IPs, and Security Groups
- Generates a multi-tab HTML report
- Supports AWS CLI profiles
- Supports region selection
- Single region
- Multiple regions
- All regions
- Python 3.9+
- AWS credentials configures via AWS ClI profiles
- Python packages:
boto3 >=1.30.0
jinja2 >=3.1.2python -m venv name_venv
source name_venv/bin/activate # Linux/Mac
name_venv/Scripts/activate # Windowsgit clone <repo-url>
cd aws-inventory
pip install -e.This installs the package in editable mode, so any changes to the source code are inmediatly available.
git clone <repo-url>
cd aws-inventory
pip install . Dependencies (
boto3,jinja2) are automatically installed fromsetup.py
aws_inventory/
├── aws_inventory/
│ ├── __init__.py
│ ├── main.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── boto_helpers.py
│ │ ├── html_report.py
│ │ └── common.py
│ └── regional/
│ ├── __init__.py
│ └── ec2.py
└── reports/ # Generated HTML reportsaws configure --profile profile_nameFrom the project root run: Single region:
python3 -m aws_inventory.main --profile profile_name --regions us-east-1Multiple regions:
python3 -m aws_inventory.main --profile profile_name --regions us-east-1,us-east-2All regions:
python3 -m aws_inventory.main --profile profile_name --regions allThe HTML report is saved in the reports/ folder:
reports/inventory_report.htmlcd reportspython3 -m http.server # Linux/Mac
py -m http.server # Windowshttp://ipaddress:8000/inventory_report.htmlYou can use
ipconfigon Windows orip aon Linux to know your ip address
Made by Dirgo