Skip to main content
Version: v1.3.0

Install InvenTag

Who this is for: anyone setting up InvenTag on a laptop, a server or a CI runner.

What you can do after reading: run inventag --help and confirm that InvenTag can reach your AWS account.

What you need​

  • Python 3.11 or later. Python 3.10 stopped getting security fixes in October 2026. See Python release status. Check your version with python3 --version.
  • pip for that Python. (Git is only needed to install from source.)
  • AWS credentials for a read-only identity. The AWS Command Line Interface (AWS CLI) is optional, but it is the easiest way to set them up.

InvenTag is published on the Python Package Index as inventag-aws. A virtual environment is the tidy way to install it, but InvenTag does not need one. It is an ordinary Python package. A virtual environment keeps its dependencies (boto3, openpyxl and others) away from your other Python tools, and many current systems (Debian, Ubuntu, Homebrew Python) refuse pip install into the system Python with an "externally-managed-environment" error. The two options that work on those systems are a virtual environment, or pipx:

Terminal
python3 -m venv .venv
source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install inventag-aws
inventag --help

Not verified against Debian, Ubuntu or Homebrew: the externally-managed-environment error and the two ways around it.

This gives you the inventag command that these docs use. The report templates are included in the package.

To upgrade, run pip install --upgrade inventag-aws. To install a specific release, pin it, for example pip install inventag-aws==1.3.0. Prefer to keep it out of your project environments? pipx install inventag-aws installs it into its own hidden environment and puts the inventag command on your PATH, so you never activate anything. If your system allows it, a plain pip install inventag-aws into your user or system Python works too.

Not verified against pip and pipx: the upgrade, pin and pipx commands.

Install from source​

Use this if you want the newest unreleased code or you plan to change InvenTag.

Terminal
git clone https://github.com/habhabhabs/inventag-aws.git
cd inventag-aws
python3 -m venv .venv
source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e .
inventag --help

pip install -e . installs the dependencies from requirements.txt and an inventag command that runs your source checkout, so your code changes take effect without a reinstall. You can also run python inventag_cli.py --help directly after pip install -r requirements.txt.

To use a fixed release from source instead of the newest code, check out its tag, for example git checkout v1.3.0. The releases page lists every release.

Connect your AWS credentials​

InvenTag uses the standard AWS credential chain, so any of these work:

With IAM Identity Center (recommended):

Terminal
aws sso login --profile my-readonly
export AWS_PROFILE=my-readonly

With long-lived access keys (avoid if you can):

Terminal
aws configure

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

Prefer short-lived credentials, such as IAM Identity Center or an assumed role, over access keys stored on disk.

Check that it works​

Terminal
inventag --validate-credentials --verbose

Exit code 0 means InvenTag could sign in. With --verbose you also see the steps. Sample output from an offline run against mocked AWS (sample data):

Output
inventag - WARNING - - No account specification method provided. Using default AWS credentials.
inventag.cli.main - INFO - 🔐 Validating AWS credentials...
inventag.cli.main - INFO - ✅ AWS credentials are valid!
inventag.cli.main - INFO - Using default AWS credentials
inventag.cli.main - INFO - Validating credentials for all accounts...
inventag.cli.main - INFO - Validating credentials for account: AWS Account 123456789012 (moto)
inventag.core.credential_manager.CredentialManager - INFO - Validating credentials for account 123456789012
inventag.core.credential_manager.CredentialManager - INFO - Successfully validated credentials for account 123456789012
inventag.cli.main - INFO - ✓ All account credentials are valid
Terminal
echo $?
Output
0

If the credentials are missing, or the security token is not valid or has expired, InvenTag says why and suggests a fix. See Fix common problems.

Give InvenTag read-only permissions​

Before your first real scan, give the identity a read-only policy: Set up read-only access.

Upgrade from v1.1.x​

What you will notice after pip install --upgrade inventag-aws:

  • Secret values are masked. Values of fields that often hold secrets, such as Lambda environment variables, become ***REDACTED*** in reports, snapshots and logs. The first run after the upgrade reports those resources as changed once. Reports and snapshots from earlier versions may still hold such values: delete or restrict them.
  • New columns. Every service sheet has source, sources and detail_level columns. See Output files.
  • More services and more API calls. InvenTag lists 22 more services, which adds sheets, rows and calls. The repository policy has 17 new read actions (and no longer lists cloudtrail:LookupEvents); without them, each denied listing is a warning, and those resources are found through the Tagging API as before, when they are tagged. The first change report after the upgrade shows the resources of the newly listed services as added, although they existed before. See IAM permissions.
  • Stricter files. An empty settings file, a key written twice or a --bom-config value of the wrong type stops the run with exit code 1.
  • Conflicting options stop with exit code 2, for example --accounts-file with --accounts-prompt, or --s3-kms-key-id without --s3-encryption aws:kms.
  • The time limit is per account, counted from when its scan starts. An account that runs out of time keeps the resources it found and counts as failed.
  • The default exit codes are the same. Codes 5 and 6 are new and only with --fail-on-account-error and --fail-if-empty. A report format that cannot be written exits with code 1.
  • Service and sheet names stay. Resources that v1.1.4 found only through the Tagging API keep their service name and sheet (for example ELASTICFILESYSTEM, STATES, COGNITO-IDP, ELASTICMAPREDUCE, KAFKA, ES). Their rows now carry the details of the service API, and the ID column of Secrets Manager secrets and MSK clusters holds the name instead of the last part of the ARN.

The full list is in the changelog.

Install for development​

Terminal
pip install -r requirements.txt -r requirements-dev.txt
python -m pytest -q

The contributing guide explains the full test suite.

Fix install problems​

What you seeWhat to do
Error: No suitable Python interpreter found. or InvenTag requires Python 3.11 or laterInstall Python 3.11 or later and check that python3 --version works.
inventag: command not foundActivate the virtual environment where you ran pip install inventag-aws, or run python -m pip show inventag-aws to check it is installed.
ModuleNotFoundErrorActivate the virtual environment and run pip install -r requirements.txt again.
No AWS credentials found!Run aws sso login or aws configure, or set AWS_PROFILE.

Not verified against the AWS CLI: the commands in the What to do column.

Next step​

Quick start