跳到主要内容
版本:v1.0.0

Generate your first report

Who this is for: you have installed InvenTag and have read-only AWS credentials.

What you can do after reading: scan one account, open the Excel and Word reports, and choose a clearer layout with a template.

Commands below use inventag. If you installed with pip install inventag-aws, type inventag instead; the options are the same.

All sample output on this page comes from an offline run against mocked AWS (sample data). Account 123456789012 and the acme-* resources are made up.

Check which account you are in​

Terminal
aws sts get-caller-identity

InvenTag scans the account these credentials belong to.

Scan one region​

Start small. One region is quick and cheap.

Terminal
inventag --create-excel --create-word --account-regions us-east-1
  • --create-excel and --create-word choose the files to write. Without either, you get Excel only.
  • --account-regions limits the scan to the regions you list, separated by commas. Without it, InvenTag scans every region enabled in the account, which takes longer. Keep us-east-1 in the list: S3, IAM, CloudFront and Route 53 are scanned only from there.

At the end you see where the files went:

Terminal
inventag - WARNING - - No account specification method provided. Using default AWS credentials.
Word document saved: bom_output/multi_account_bom_20261112_090000.docx
Data exported to bom_output/multi_account_bom_20261112_090000.xlsx

The warning only says you didn't name an account, so InvenTag used your current credentials. Add --verbose to see each step.

Open the reports​

The Excel workbook has a Summary sheet and one sheet per service. Without a template, each service sheet lists every field InvenTag found, so the sheets are wide:

Sheets: Summary, DYNAMODB, EC2, EVENTS, IAM, KMS, LAMBDA, S3, VPC

S3 sheet, first rows:

servicetypeidnamearnaccount_idsource_account_idsource_account_name...
S3Bucketacme-app-logsacme-app-logsarn:aws:s3:::acme-app-logs123456789012AWS Account 123456789012 (moto)...
S3Bucketacme-data-lakeacme-data-lakearn:aws:s3:::acme-data-lake123456789012AWS Account 123456789012 (moto)...
S3Bucketacme-reportsacme-reportsarn:aws:s3:::acme-reports123456789012AWS Account 123456789012 (moto)...

The sheet has 30 columns; the first 8 are shown.

The Word document has a summary, a table of services and up to 50 resources per service:

Document outline:

  • AWS Resource Inventory - BOM Report (title)
  • Executive Summary
    • Service Summary
  • Detailed Resource Inventory
    • DYNAMODB Resources (1)
    • EC2 Resources (4)
    • EVENTS Resources (1)
    • IAM Resources (1)
    • KMS Resources (14)
    • LAMBDA Resources (1)
    • S3 Resources (4)
    • VPC Resources (10)
  • Report Information

A table from the document:

ServiceResource CountPercentage
DYNAMODB12.8%
EC2411.1%
EVENTS12.8%
IAM12.8%

(8 rows in total; 4 shown.)

InvenTag also saves a snapshot of the run in bom_output/state/.

Choose a layout with a template​

A report template gives you readable column names, one column per tag, a frozen header row and filter buttons:

Terminal
inventag --template standard-bom --create-excel --create-word --account-regions us-east-1
Terminal
inventag - WARNING - - No account specification method provided. Using default AWS credentials.
Wrote bom_output/multi_account_bom_20261112_090000.docx
Wrote bom_output/multi_account_bom_20261112_090000.xlsx

See what the result looks like in Built-in templates.

Check your tags​

Add a tag policy to see which resources are missing tags:

Terminal
inventag --template finops-cost-report --create-excel --create-word --account-regions us-east-1
Terminal
inventag - WARNING - - No account specification method provided. Using default AWS credentials.
Wrote bom_output/tag_compliance_20261112_090000.json
Wrote bom_output/multi_account_bom_20261112_090000.docx
Wrote bom_output/multi_account_bom_20261112_090000.xlsx
Tag policy 'finops-cost-allocation': 1 of 22 resources compliant (4.5%), 21 non-compliant, 14 out of scope.

The workbook now has a Tag Compliance sheet that lists what is missing on each resource. More in Check tags against a policy.

What a run costs​

The read-only calls InvenTag makes are free. Cost Explorer GetCostAndUsage calls are not: AWS charges per request, and a default run makes two for each account in our offline test. See the current Cost Explorer pricing. Add --no-billing-validation to make no Cost Explorer calls.

Next steps​