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

Example: quick audit of one account

Goal: a readable inventory of one account, in Excel and Word, in a few minutes.

You need: credentials for the account, for example aws sso login --profile prod-readonly and export AWS_PROFILE=prod-readonly.

Not verified against the AWS CLI: the sign-in commands in this section.

Template​

The built-in single-account config template scans us-east-1 and writes both files with the standard-bom layout. Copy it and set your regions:

Terminal
inventag templates init single-account --output .inventag/templates/audit.yaml
.inventag/templates/audit.yaml
format_version: 1
kind: config
name: audit
description: Scan the account of your current credentials and write Excel and Word reports.
spec:
regions: [us-east-1, eu-west-1] # the regions you use
outputs: [excel, word]
output_directory: bom_output
report_template: standard-bom

Command​

Terminal
inventag templates validate audit
inventag --template audit

Output​

The same layout from an offline run with one region argument (sample data; IAM is listed under the region global, so the summary counts 2 regions):

Output
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

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

Summary sheet:

AWS Resource Inventory
Bill of materials generated by InvenTag
Generated: 2026-11-12 09:00 UTC
Accounts: 1 Regions: 2

ServiceResourcesShare
ATHENA12.7%
DYNAMODB12.7%
EC2410.8%
EVENTS12.7%
IAM12.7%
KMS1437.8%
LAMBDA12.7%
S3410.8%
VPC1027.0%
Total37100.0%

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

S3 sheet, first rows:

AccountRegionServiceTypeNameIDARNTag: CostCenterTag: DataClassificationTag: EnvironmentTag: Owner...
123456789012us-east-1S3Bucketacme-app-logsacme-app-logsarn:aws:s3:::acme-app-logsCC-1001internalprodplatform...
123456789012us-east-1S3Bucketacme-data-lakeacme-data-lakearn:aws:s3:::acme-data-lakeCC-2002proddata...
123456789012us-east-1S3Bucketacme-reportsacme-reportsarn:aws:s3:::acme-reports1234Productionfinance...
123456789012us-east-1S3Bucketacme-scratchacme-scratcharn:aws:s3:::acme-scratch...

The sheet has 12 columns; the first 11 are shown.

Next steps​

  • Add a tag check: inventag --template audit --template security-baseline.
  • Values of fields that often hold secrets, such as Lambda environment variables, show as ***REDACTED*** in the reports.
  • Run it every week: Run InvenTag in CI/CD.