Installation¶
IAM Policy Validator can be installed using several methods. Choose the one that best fits your workflow.
Requirements¶
- Python 3.10 or higher
- pip, uv, or pipx for installation
Installation Methods¶
pip (Recommended)¶
The simplest way to install:
pip install iam-policy-validator
uv (Fast)¶
If you use uv for faster Python package management:
uv add iam-policy-validator
Or install globally:
uv tool install iam-policy-validator
pipx (Isolated)¶
For isolated installation that doesn't affect your global Python:
pipx install iam-policy-validator
From Source¶
For the latest development version:
git clone https://github.com/boogy/iam-policy-validator.git
cd iam-policy-validator
pip install -e .
Verify Installation¶
After installation, verify it works:
iam-validator --version
You should see output like:
iam-validator 1.17.0
Shell Completion¶
Enable shell completion for a better CLI experience.
--install writes the completion script to your user completion directory and
prints the one line to add to your shell rc file:
iam-validator completion bash --install
Installs to ~/.local/share/bash-completion/completions/iam-validator, then
add to ~/.bashrc:
source "$HOME/.local/share/bash-completion/completions/iam-validator"
iam-validator completion zsh --install
Installs to ~/.local/share/zsh/site-functions/_iam-validator, then add to
~/.zshrc:
fpath+=("$HOME/.local/share/zsh/site-functions")
autoload -Uz compinit && compinit
Re-run the same command after upgrading — it always overwrites, so the completions never go stale.
To evaluate the script directly instead of installing it, drop --install:
# Add to ~/.bashrc
eval "$(iam-validator completion bash)"
# Add to ~/.zshrc
eval "$(iam-validator completion zsh)"
Upgrading¶
To upgrade to the latest version:
pip install --upgrade iam-policy-validator
Uninstalling¶
To remove IAM Policy Validator:
pip uninstall iam-policy-validator
Troubleshooting¶
Command Not Found¶
If iam-validator is not found after installation:
- Check your PATH — Ensure
~/.local/binis in your PATH - Restart your terminal — Some changes require a new shell session
- Use full path — Try
python -m iam_validator.core.cli
Permission Errors¶
If you get permission errors:
# Use --user flag
pip install --user iam-policy-validator
# Or use a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install iam-policy-validator
Python Version Issues¶
IAM Policy Validator requires Python 3.10+. Check your version:
python --version
If you have multiple Python versions, specify the correct one:
python3.10 -m pip install iam-policy-validator
Next Steps¶
- Quick Start — Validate your first policy
- CLI Reference — Full command documentation