Installing Amazon Credential Daemon
Amazon Credential Daemon (credsd) is a local service that stores your Amazon credentials in a protected
backend on your computer, instead of in plaintext config and
credentials files. The Amazon CLI, the Amazon SDKs, and tools built on them get
short-lived credentials from the daemon through a credential_process profile, with
any Amazon CLI or SDK version.
With the daemon, your credentials stay out of plaintext files while your commands and
programs keep working as before. For the client commands, non-Amazon CLI credential sources, and
conceptual information, see Using
Amazon Credential Daemon
After you install Amazon Credential Daemon, configure a profile so that the Amazon CLI and Amazon SDKs get credentials from the daemon. For more information, see Using Amazon Credential Daemon with the Amazon CLI and Amazon SDKs.
Topics
Prerequisites
Before you install Amazon Credential Daemon, confirm the following.
-
On Linux, you have root access (
sudo). On macOS, you don't need root access. -
To verify the signature of a downloaded package, you installed GnuPG (
gpg). This step is optional but recommended. -
On Linux with a Trusted Platform Module (TPM), you installed the
tpm2-tsspackage. On Amazon Linux 2023, use the following command.$sudo dnf install -y tpm2-tssOn Ubuntu, use the following command.
$sudo apt-get install -y libtss2-devOn Amazon EC2, the instance must have NitroTPM enabled. Use a UEFI boot-mode AMI that is registered with TPM 2.0 support (
--boot-mode uefi --tpm-support v2.0).
Platform availability
Amazon Credential Daemon is available for macOS and Linux today. Windows availability is planned for Q1 2027. The following table lists the available platforms and their packages.
Platform |
Package |
Notes |
|---|---|---|
macOS 11 or later, Apple silicon |
|
Amazon Credential Daemon isn't available for Intel-based Macs. |
Linux, x86_64 and arm64 |
|
Portable builds for glibc 2.17 or later, including Amazon Linux 2, Amazon Linux
2023, and Ubuntu. Use a |
Windows |
Not yet available |
Planned for Q1 2027. |
The daemon stores its encryption key in a storage backend that depends on how and where you install it. The following table shows the backend that each install shape uses.
Backend |
Install shape |
Where the key is kept |
|---|---|---|
|
macOS (signed release, LaunchAgent) |
A data protection keychain item that only the signed credsd app can open |
|
Linux (systemd) |
The computer's TPM 2.0 |
|
Linux without a TPM |
A file on disk, readable by the daemon's account. This backend isn't hardware-protected. |
On a host without a TPM, the only backend is file, which keeps the
encryption key in a file instead of in hardware. Use this backend only if you accept that
anyone who can read the daemon's files can decrypt your credentials.
To install Amazon Credential Daemon on macOS
The signed package installs Amazon Credential Daemon for your user. It needs no administrator rights, and keeps the encryption key in a data protection keychain item that only the signed credsd app can open.
-
Download the package and its signature.
$base=https://github.com/aws/credential-daemon/releases/latest/download$curl -fLO "$base/credsd-macos-aarch64.pkg"$curl -fLO "$base/credsd-macos-aarch64.pkg.sig" -
(Optional, recommended) Verify the signature. Import the signing key, check the fingerprint, and verify the package.
$curl -fsSL https://raw.githubusercontent.com/aws/credential-daemon/main/KEYS | gpg --import$gpg --fingerprint aws-credential-daemon@amazon.com$gpg --verify credsd-macos-aarch64.pkg.sig credsd-macos-aarch64.pkgConfirm that the fingerprint is
91AA 53FE 815B 7D0D C20D 1467 189A 6EBA E4B4 D2A4and thatgpgreports a good signature. -
Install the package for your user. No administrator rights are needed.
$installer -pkg credsd-macos-aarch64.pkg -target CurrentUserHomeDirectory -
Open a new terminal window so that
~/.local/binis on yourPATH. -
Confirm that the daemon is running.
$credsd statusThe output shows
installed: true,running: true, and thedata-protection-keychainbackend.
To install Amazon Credential Daemon on Linux
On Linux, Amazon Credential Daemon runs as a system service that systemd starts on the first request.
-
Download the archive for your distribution and architecture, and its signature. Choose the
-tpmarchive if the host has a TPM 2.0 (the device/dev/tpmrm0exists).$base=https://github.com/aws/credential-daemon/releases/latest/download$f=credsd-linux-x64-tpm.tar.gz$curl -fLO "$base/$f" && curl -fLO "$base/$f.sig" -
(Optional, recommended) Verify the signature as in the macOS procedure, using the
.tar.gzand.tar.gz.sigfiles. -
Extract the archive and install the commands.
$tar xzf "$f"$sudo install -m 0755 "${f%.tar.gz}/credsd" "${f%.tar.gz}/creds" /usr/local/bin/ -
Install the system service, and then confirm that it is running.
$sudo credsd install --storage-backend tpm$credsd statusinstalled: true running: true binary: /usr/local/bin/credsd args: --storage-backend tpm serve --system backend: tpm data dir: /var/lib/credsd socket: /run/credsd/credsd.sockOn a host without a TPM, use the plain archive (
credsd-linux-x64.tar.gzorcredsd-linux-aarch64.tar.gz), and install with thefilebackend instead. You must name it explicitly; see the warning in Platform availability.$sudo credsd install --storage-backend file
The service is socket-activated (credsd.socket and
credsd.service): systemd starts the daemon on the first request. The daemon reads
the TPM through /dev/tpmrm0, which must be owned by root:tss
with mode 0660. If creds list hangs right after you install
tpm2-tss, see Troubleshooting.
To uninstall Amazon Credential Daemon
Before you uninstall the daemon, remove the credential_process line from any
profile that uses Amazon Credential Daemon, and restore whatever credentials that profile used before. For
more information, see Using Amazon Credential Daemon with the Amazon CLI and Amazon SDKs.
Uninstall the daemon with one of the following methods.
-
For a per-user install on macOS, run the following command. Then move
~/Applications/Credsd.appto the Trash, and remove~/.local/bin/credsdand~/.local/bin/creds.$credsd uninstall --user -
On Linux, run the following command.
$sudo credsd uninstall
Uninstalling removes the service but keeps your sealed credentials and the encryption key,
so reinstalling brings them back. To also delete the key when you uninstall, add the
--purge-key option.
$sudo credsd uninstall --purge-key
The --purge-key option deletes the encryption key. Every credential sealed
under that key becomes permanently unreadable, and you can't recover it. First remove the
credential_process line from each profile that uses Amazon Credential Daemon, and restore that
profile's previous credentials.
If you can no longer open the sealed credentials, what you do next depends on the kind of credential.
-
For an Amazon Sign-In session or an IAM Identity Center session, sign in again. There is no provisioned secret to recover.
-
For a provisioned long-term credential, such as an IAM user access key pair or an IAM Roles Anywhere certificate and private key, you need the original, or you must rotate or regenerate it. Keep a copy in escrow if your process requires one.
Amazon Credential Daemon does not delete the file you imported a secret from. For example, creds
bootstrap --credential copies the private key into secure storage and leaves
the original file where it is.name --private-key
file