Keep AWS credentials off developer laptops with AWS Credential Daemon

Keep AWS credentials off developer laptops with AWS Credential Daemon

Move AWS keys off developer laptops with AWS Credential Daemon, IAM Identity Center and per-agent IAM roles. Five steps a startup team can start this week.

Open  ~/.aws/credentials  on a developer laptop at a young startup and you will often find a long-term access key created in the first week of the company. It still works, it has broad permissions, and nobody remembers why. Today the same laptop also runs AI coding agents, which read the same file and act with the same permissions as the developer.
This post describes a plan to remove those plaintext credentials, built around AWS Credential Daemon (credsd), released in preview on December 1, 2026, and combined with per-agent identities and generally available services.

Context: two new previews

During his re:Invent 2026 keynote, AWS CEO Matt Garman said that "the most common pattern that I see is people giving their agent their own personal credentials to get tasks done" ( Forbes ). The agent then has more access than its task needs, and its actions look like the person's.
AWS announced two previews that address this.  AWS Credential Daemon  keeps credentials on the laptop encrypted and hands out only short-lived sessions.  IAM agent and workload identity , part of IAM for agents, gives each agent its own verifiable identity on top of an existing IAM role, and AWS CloudTrail records which agent made each request.

How AWS Credential Daemon works

credsd is an open-source local service under the Apache 2.0 license, with two commands:  credsd , the daemon, and  creds , the client ( project repository ). You store a long-lived secret in it once, such as an IAM Identity Center sign-in or an old access key you cannot remove yet. The daemon seals it under a master key in a hardware-backed store. On macOS, the signed release uses a data protection keychain item that only the signed credsd app can open. On Linux, it uses the TPM 2.0 chip.
A tool that needs AWS access asks the daemon over a local socket and receives temporary credentials, while the long-term secret stays inside the daemon. Any AWS CLI or SDK version can use it through the  credential_process  setting, and so can tools built on them such as Terraform and the AWS CDK ( AWS CLI documentation ).
Three properties matter for a small team:
  • Sessions refresh in the background. The daemon asks you to sign in again only when the underlying session reaches its maximum lifetime.
  • A local audit log records the calling process tree (user ID, process ID and executable path) for every credential request, and tags known agent tools as a best-effort guess.
  • Reading a credential needs no approval, but removing or replacing one requires Touch ID on macOS or a  sudo  approval on Linux. A script or agent cannot quietly swap the credential your profile uses.
Paired with Strands Box, credsd can also give a sandboxed agent a third-party secret by name, so the value never enters the agent's environment. It is not a general-purpose secret store, and everything it holds belongs to one user on one machine.

Why it matters for startups

A long-term credential stays valid until someone deletes it, so one copied file or committed  .env  file can expose an account for months. Embedded secrets remain common: at the end of November 2026,  HPE  patched two maximum-severity hardcoded credential flaws (CVE-2026-137285 and CVE-2026-137286) that it had found internally.

Five steps you can start this week

1. Audit plaintext credentials

Search  ~/.aws/credentials ,  .env  files in your repositories, and the configuration folders of your AI coding agents. Long-term access keys start with  AKIA :
$ grep -rIlE "AKIA[0-9A-Z]{16}" ~/.aws ~/code 2>/dev/null
Then check the IAM credential report. Delete any key unused for 90 days, and replace laptop keys in step 2.

2. Move people to IAM Identity Center sessions

Give every developer a user in IAM Identity Center with a least-privilege permission set.  aws configure sso  writes a profile to  ~/.aws/config  with no secret keys ( AWS CLI documentation ):
[profile dev]
sso_session = my-sso
sso_account_id = 123456789012
sso_role_name = Developer

[sso-session my-sso]
sso_region = us-east-1
sso_start_url = https://my-sso-portal.awsapps.com/start
Developers run  aws sso login  and get temporary credentials for that role. Then delete the IAM user access keys from step 1. The CLI still caches the Identity Center token in a file under  ~/.aws/sso/cache , which step 3 removes.

3. Move laptop credentials into AWS Credential Daemon

Start with a few laptops. On Linux, the daemon runs as a systemd service that keeps its key in the TPM 2.0 chip, so install  tpm2-tss  first. Pin a release you have tested, verify its signature, and update the version on purpose. The  installation guide  also covers macOS.
$ tag=v0.3.0
$ base=https://github.com/aws/credential-daemon/releases/download/$tag
$ f=credsd-linux-x64-tpm.tar.gz
$ curl -fLO "$base/$f" && curl -fLO "$base/$f.sig"
$ curl -fsSL https://raw.githubusercontent.com/aws/credential-daemon/main/KEYS | gpg --import
$ gpg --verify "$f.sig" "$f"
$ tar xzf "$f"
$ sudo install -m 0755 "${f%.tar.gz}/credsd" "${f%.tar.gz}/creds" /usr/local/bin/
$ sudo credsd install --storage-backend tpm
$ credsd status
Store the Identity Center sign-in in the daemon, point a profile at the  creds  client, and test it:
$ creds bootstrap --credential work aws-idc-sso \
--start-url https://my-sso-portal.awsapps.com/start --sso-region us-east-1 \
--account-id 123456789012 --role-name Developer
[profile work]
region = us-east-1
credential_process = /usr/local/bin/creds get --credential work --format credential-process
$ aws sts get-caller-identity --profile work
Use the absolute path to  creds . Remove any access keys in  ~/.aws/credentials  and any  AWS_*  environment variables for that profile, because the CLI and SDKs read those first. If you import an existing secret, delete the original file yourself, because credsd leaves it in place. For tools that ignore the AWS config file,  eval "$(creds get --credential work --format shell)"  exports short-lived credentials into the current shell.
Treat this as a pilot. Commands, configuration and on-disk formats can change between preview releases without a migration path. The preview runs on macOS 11 or later on Apple silicon and on Linux, with Windows planned. On Linux without a TPM 2.0, the key falls back to a file on disk, which is not hardware protected.

4. Give each AI agent its own scoped identity

For a coding agent on a laptop, create a dedicated IAM role with only the permissions it needs, often read-only, and store a separate credential for it in credsd. Since release v0.3.0, a stored credential can also carry a boundary policy that narrows every session credsd serves for it ( release notes ). Adding a first boundary needs no approval, but replacing or removing it does, so the agent cannot widen its own access:
$ creds bootstrap --credential agent-ro aws-idc-sso \
--start-url https://my-sso-portal.awsapps.com/start --sso-region us-east-1 \
--account-id 123456789012 --role-name AgentReadOnly \
--boundary-policy file://agent-boundary.json
Give the agent its own profile. The  --agentic  flag records the caller as an agent in the local audit log:
[profile agent]
region = us-east-1
credential_process = /usr/local/bin/creds get --credential agent-ro --agentic --format credential-process
CloudTrail then records the agent's actions under its own role.
For agents hosted on Amazon EKS, Amazon Bedrock AgentCore Runtime or AgentCore Gateway, try IAM agent and workload identity. AWS issues the identity only after the hosting service proves where the agent runs, and policies can reference it ( IAM User Guide ). It is in preview and subject to change.
Keep application API keys in AWS Secrets Manager, where services retrieve them at runtime and can rotate them automatically ( Secrets Manager User Guide ).

5. Add secret scanning to CI

Turn on your Git host's secret scanning, or run an open-source scanner as a required check on every pull request that blocks AWS key patterns and  .env  files. When a scan finds a key, deactivate it, replace it and review its activity in CloudTrail. With AWS Organizations, a service control policy that denies  iam:CreateAccessKey  outside an approved administrator role stops new long-term keys from appearing.

Conclusion

A small team can complete these five steps in a few weeks. credsd and agent identity are previews, so pilot them before a company-wide rollout.
To go further, the  AWS Credential Daemon documentation  covers the threat model, storage backends and commands, the  agent and workload identity guide  explains templates and attestation policies, and the  AWS Well-Architected Framework Security Pillar  explains why temporary credentials should replace long-term keys.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article