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

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.

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 in one region (sample data):

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

Sheets: Summary, 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
DYNAMODB12.8%
EC2411.1%
EVENTS12.8%
IAM12.8%
KMS1438.9%
LAMBDA12.8%
S3411.1%
VPC1027.8%
Total36100.0%

Sheets: Summary, 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.
  • Run it every week: Run InvenTag in CI/CD.