Getting started¶
Install¶
First run¶
# 1. Tell agent-aws which profiles in ~/.aws/config it should expose
agent-aws init --all
# 2. Log into your IAM Identity Center session (opens a browser)
agent-aws login
# 3. Confirm the sandboxed identity is read-only
agent-aws whoami
# {
# "Arn": "arn:aws:sts::...:assumed-role/AWSReservedSSO_ReadOnlyAccess_.../you"
# }
# 4. Run an agent with scoped AWS access
agent-aws run -- claude
Inside the sandboxed process:
aws ...works with the default profile.aws --profile NAME ...switches between configured accounts.~/.aws/is empty / unreadable. The agent cannot mint admin credentials even if it tries.
What agent-aws init does¶
- Reads
~/.aws/config. - Filters out any profile whose
sso_role_namelooks admin-equivalent (Administrator*,PowerUser*,*FullAccess). - Prompts you to pick which of the remaining profiles to expose. (Or pass
--all, or--profile NAMErepeatedly.) - Writes
~/.agent-aws/config.json(mode600) with the selected profiles and their SSO session metadata.
The init step never touches credentials — it only records which profiles the agent is allowed to use. Real STS credentials are minted at run time.
Common workflows¶
Scope a run to a single account¶
The tempdir handed to the sandbox contains creds for ProdReadOnly only.
Other profiles are entirely absent.