AWS Credential Daemon moves CLI credentials out of plaintext files and away from local AI agents
AWS has open-sourced AWS Credential Daemon (credsd), a local service that encrypts AWS and third-party credentials using the workstation's TPM or keychain. It ships as a preview integration in the AWS CLI on macOS and Linux. It targets teams whose developers run AI coding agents on their own machines.
What to do now
AWS has released AWS Credential Daemon, or credsd, as open source. The background service keeps the credentials used by the AWS CLI, local AI coding agents and Strands Box sealed on the workstation. Strands Box is AWS's sandboxed runtime for agents. The AWS CLI integration is in preview and runs on macOS and Linux.
The problem it addresses is long-standing. Until now, the AWS CLI and AWS SDKs stored static access keys, SSO tokens and session caches as plaintext files under ~/.aws/. Only operating system file permissions protected them. That model cannot tell a developer typing in a terminal apart from an AI agent running under the same user ID. The agent therefore inherits everything the developer can reach. That includes extended sign-in sessions, which AWS now lets customers configure for up to 90 days for IAM users and roles.
AWS names three risks. First, agents carry far broader authority than their task needs, with no access decision at the time of use and no record of who did what. Second, prompt injection through untrusted content can trick an agent into misusing those permissions or leaking keys read from disk. Third, a single file copied from ~/.aws/ can hand an attacker persistent cloud access that can be replayed.
With credsd, refresh tokens, signing keys and static IAM keys are encrypted at rest. The master key is held in the data protection keychain on macOS and in a TPM 2.0 chip on Linux, so a copied file is no longer a working credential. The daemon refreshes sessions in the background and only hands out short-lived credentials, never long-term secrets. Every request is logged locally with the caller's uid, process ID and executable path, as reported by the kernel.
For developers, the commands stay the same. Running aws configure credential-daemon install sets up the service. On Linux it installs as a system service with sudo, and other users on the machine connect with aws configure credential-daemon link. On the next aws login, the CLI offers to store the session in the daemon. If the user accepts, the plaintext cache in ~/.aws/login/cache/ is deleted. Existing IAM access keys are migrated for now with creds bootstrap. AWS advises rotating the key in IAM afterwards, since old copies in backups or dotfiles stay valid. Support for aws sso login and a bulk migration command (aws configure migrate-credentials) are announced for later.
Sealing keys is not enough on its own. An agent running directly as the developer can still request a short-lived credential and act with full developer permissions. AWS therefore suggests pairing credsd with Strands Box. The sandbox's egress gateway fetches a session from the daemon over a local Unix socket and SigV4-signs requests as they leave. Inside the sandbox, the agent only sees placeholder keys. The same mechanism injects third-party tokens, for example for GitHub, without exposing them in the agent's environment. credsd can also hold OAuth tokens, JWTs and static API keys.
To cap what an agent can do, credsd applies an inline scope-down policy at issuance through sts:GetScopedCredentials. AWS enforces the limit when it creates the session, not the local machine, so whoever holds the session cannot widen it. AWS recommends combining this with a dedicated IAM role for the agent. That is also the only reliable way to separate agent and developer actions in CloudTrail, because credsd's own logging stays on the host.
The preview has limits. On a Linux host without a TPM, installation fails rather than downgrading. An administrator can then explicitly choose a file backend, which keeps the master key in a 0600 file and relies on full-disk encryption. Local SDK applications must use a credential_process profile during the preview. Keys left in ~/.aws/credentials or in .bashrc and .zshrc are still resolved first by the SDKs and remain readable by agents.
What to do now
- Inventory static IAM keys left in ~/.aws/credentials and in shell profiles (.bashrc, .zshrc) on developer workstations, and remove exported keys.
- Trial the preview on a macOS or Linux workstation with aws configure credential-daemon install, then run credsd status to confirm the TPM or keychain backend is in use.
- After migrating an IAM key with creds bootstrap, rotate it in IAM so copies in backups stop working.
- Give AI agents a dedicated IAM role narrowed with sts:GetScopedCredentials, so their reach is bounded and their actions are identifiable in CloudTrail.
- Point local SDK applications at a credential_process profile while the preview lasts.