Inventory Commands¶
Enumerate what actually exists in an account. scan walks services and regions in parallel and writes one file per service per region; download-all does the same and adds CloudFormation backups and WorkSpaces metrics.
Both write to a directory rather than printing to stdout, because a full account scan produces far more output than a terminal is useful for.
Commands¶
inventory download-all¶
Download comprehensive inventory of all AWS resources including optional CloudFormation backups.
| Option | Value | Description |
|---|---|---|
--output-dir |
TEXT |
Directory to save all inventory files (default: ./full_inventory_ |
--services |
TEXT |
Comma-separated list of services to include (default: all supported services) |
--regions |
TEXT |
Comma-separated list of regions to scan (default: all regions) |
--format |
json | yaml |
Output format for saved files (default: json) |
--include-tags |
flag | Include resource tags where available (slower but more comprehensive) |
--include-cloudformation |
flag | Include CloudFormation stack backups |
--include-workspaces-metrics |
flag | Include WorkSpaces CloudWatch metrics |
--parallel-regions |
INTEGER |
Number of regions to process in parallel (default: from config) |
--tag-key |
TEXT |
Filter resources by tag key (e.g., Environment). Requires --include-tags. |
--tag-value |
TEXT |
Filter resources by tag value (requires --tag-key and --include-tags) |
inventory scan¶
Comprehensive AWS resource inventory scan across services and regions.
| Option | Value | Description |
|---|---|---|
--output-dir |
TEXT |
Directory to save inventory files (default: ./inventory_ |
--services |
TEXT |
Comma-separated list of services to scan (default: all supported services) |
--regions |
TEXT |
Comma-separated list of regions to scan (default: all regions) |
--format |
json | yaml |
Output format for saved files (default: json) |
--include-tags |
flag | Include resource tags where available (slower but more comprehensive) |
--parallel-regions |
INTEGER |
Number of regions to process in parallel (default: from config) |
--tag-key |
TEXT |
Filter resources by tag key (e.g., Environment). Requires --include-tags. |
--tag-value |
TEXT |
Filter resources by tag value (requires --tag-key and --include-tags) |
inventory services¶
List all supported services for inventory scanning.
inventory workspaces¶
Generate comprehensive WorkSpaces inventory report with optional metrics.
| Option | Value | Description |
|---|---|---|
--region |
TEXT |
AWS region to scan for WorkSpaces (default: current region) |
--output-file |
TEXT |
Output file for WorkSpaces report (supports .csv, .json, .yaml) |
--include-metrics |
flag | Include CloudWatch metrics for each WorkSpace (slower) |
--lookback-days |
INTEGER |
Number of days to look back for metrics (default: 30) |
--metric-names |
TEXT |
Comma-separated list of CloudWatch metrics to collect (default: Available) |
--tag-key |
TEXT |
Filter WorkSpaces by tag key (e.g., Environment) |
--tag-value |
TEXT |
Filter WorkSpaces by tag value (requires --tag-key) |
Examples¶
# What can be scanned
aws-cloud-utilities inventory services
# Full scan, all services, all regions
aws-cloud-utilities inventory scan --output-dir ./inventory
# Narrow to specific services and regions
aws-cloud-utilities inventory scan --services ec2,s3,rds --regions us-east-1,us-west-2
# Include tags, and filter to one tag value
aws-cloud-utilities inventory scan --include-tags --tag-key Environment --tag-value production
# Raise region parallelism, write YAML
aws-cloud-utilities inventory scan --parallel-regions 8 --format yaml
# Everything, including CloudFormation templates and WorkSpaces metrics
aws-cloud-utilities inventory download-all --output-dir ./full-inventory \
--include-cloudformation --include-workspaces-metrics
# WorkSpaces report with 90 days of CloudWatch metrics
aws-cloud-utilities inventory workspaces --include-metrics --lookback-days 90 --output-file workspaces.csv
Tag filtering¶
--tag-key and --tag-value require --include-tags, because tags have to be fetched before they can
be filtered on. --tag-value additionally requires --tag-key. Fetching tags means an extra API call
per resource, so a tag-filtered scan is meaningfully slower than a plain one.
Notes¶
--services and --regions are comma-separated lists. Omitting them scans everything, which on a
large account can take a long time and will hit API rate limits - lower --parallel-regions if you
see throttling.
Related¶
- CloudFormation Commands - stack backups, also reachable via
download-all - Cost Optimization Commands - what the inventory is costing you
- Account Commands - confirm the target account first