aws-vault
$ aws-vault Community High Riskaws-vault keeps long-lived AWS IAM access keys encrypted in the OS keychain instead of plaintext ~/.aws/credentials, injecting temporary STS credentials into subshells via aws-vault exec. However, macOS Keychain prompts and MFA dialogs can block headless agents.
brew install --cask aws-vault aws-vault exec wraps local aws CLI subprocesses with STS env vars; an MCP layer cannot unlock OS keychains safely.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
aws-vault exec works cleanly once unlocked, but lacks --json and stalls if macOS Keychain or --prompt MFA dialogs appear.
- Table-formatted
list; interactive Keychain/MFA unlocks block headless runs
Strongly improves local IAM hygiene via short-lived STS tokens, though aws-vault export and --server EC2 metadata mode carry credential-exposure risks.
aws-vault exportprints temporary credentials to stdout
Single Go binary, though keychain backends differ sharply between macOS Keychain and headless Linux (pass/file).
- Platform-dependent keychain backend setup
Protects developer laptops from plaintext ~/.aws/credentials leaks while remaining transparent to aws CLI.
- Drop-in STS session wrapper for AWS tools
Established OSS standard (99designs/aws-vault) in mature maintenance mode.
- Widely adopted MIT project
Thorough USAGE.md covering keychain backends, MFA, and IAM role assumptions.
- Detailed USAGE.md documentation
Security, Auth & Guardrails
Encrypts long-lived IAM keys in macOS Keychain, Secret Service, pass, or encrypted file backend; reads profile roles from ~/.aws/config.
100% free and open-source (MIT).
# aws-vault Agent Rules - Use `aws-vault exec <readonly-profile> -- <cmd>`; NEVER run `aws-vault export` (which prints raw STS keys to stdout). - Expect macOS Keychain / MFA prompts if the vault is locked; ask the user to unlock or authenticate first.
Agent-Ready Command Recipes
Safe Read-Only Queries
aws-vault list
Displays configured profiles, credential existence, and cached STS sessions without printing secrets.
aws-vault exec dev-readonly -- aws sts get-caller-identity --output json --no-cli-pager
Mints short-lived STS credentials in memory to run a read-only aws check.
Strengths for Agents
- + Eliminates plaintext
~/.aws/credentialsby encrypting IAM keys in OS keychains. - + Injects short-lived STS credentials straight into child
awsCLI invocations.
Caveats & Pitfalls
- ! Keychain unlock and MFA prompts require human interaction when sessions expire.
- ! Never run
aws-vault exportin agent shells as it printsAWS_SECRET_ACCESS_KEYandAWS_SESSION_TOKEN.