The AWS Workload Credentials Provider (formerly the AWS Secrets Manager Agent) is a client-side solution that helps you standardize how you consume credentials
The AWS Workload Credentials Provider (formerly the AWS Secrets Manager Agent) is a client-side solution that helps you standardize how you consume credentials
The AWS Workload Credentials Provider (formerly the AWS Secrets Manager Agent) is a client-side solution that helps you standardize how you consume credentials from AWS services across your compute environments. It includes the following capabilities:
The Workload Credentials Provider retrieves and caches secrets in memory so that your applications can consume secrets from localhost instead of making direct calls to Secrets Manager. It can only read secrets - it can't modify them.
The Workload Credentials Provider uses the AWS credentials you provide in your environment to make calls to Secrets Manager. The Workload Credentials Provider offers protection against Server Side Request Forgery (SSRF) to help improve secret security. It also uses the post-quantum ML-KEM key exchange as the highest-priority key exchange by default. You can configure the Workload Credentials Provider by setting the maximum number of connections, the time to live (TTL), the localhost HTTP port, and the cache size.
Because the Workload Credentials Provider uses an in-memory cache, it resets when the Workload Credentials Provider restarts. The Workload Credentials Provider periodically refreshes the cached secret value. The refresh happens when you try to read a secret from the Workload Credentials Provider after the TTL has expired. The default refresh frequency (TTL) is 300 seconds, and you can change it by using a Configuration file which you pass to the Workload Credentials Provider using the sm start --config /path/to/config.toml command line argument. The Workload Credentials Provider does not include cache invalidation. For example, if a secret rotates before the cache entry expires, the Workload Credentials Provider might return a stale secret value.
The Workload Credentials Provider returns secret values in the same format as the response of GetSecretValue. Secret values are not encrypted in the cache.
The Workload Credentials Provider exports certificates from AWS Certificate Manager (ACM) and writes them as PEM files to the local filesystem. It automatically checks for updated certificates every 24 hours and optionally runs a user-configured command after each successful refresh (for example, to reload a web server). You can configure up to 50 certificates. Each certificate is managed by an independent background task, providing fault isolation so that one certificate's failure does not affect others.
The Certificate Management capability supports Linux and Windows, and works with web servers such as NGINX and Apache.
The Workload Credentials Provider uses the AWS credentials you provide in your environment to assume the role you have configured for each certificate, and then calls ACM to export the certificate.
Important
The Certificate Management capability requires elevated permissions for the provider to write certificate files and execute refresh commands. The install script (Linux) or install.ps1 script (Windows) configures these permissions automatically and is the recommended setup path. On Linux, if you need to manage specific permissions yourself, use the --no-privileges or --no-sudoers flags rather than bypassing the install script entirely. For details on what permissions are configured, see Security considerations.
You can provide a custom configuration by passing --config /path/to/config.toml on startup or on reload while the provider is running. On Windows, use -Config C:\path\to\config.toml when invoking the PowerShell scripts and --Config C:\path\to\config.toml when executing the binary command. The reload re-applies permissions and restarts the ACM service.
For full configuration details, see Configure the Workload Credentials Provider.
To download the source code, see https://github.com/aws/aws-workload-credentials-provider on GitHub.
Topics
refreshNow parameter behaviorThe bootstrap installers download a released binary and the matching configuration directory, then run the install script for you. Use them unless you need to build from source, in which case follow Step 1 and Step 2 instead.
installer=$(mktemp) && trap 'rm -f "$installer"' EXIT &&
curl --proto '=https' --tlsv1.2 -fsSL -o "$installer" \
https://raw.githubusercontent.com/aws/aws-workload-credentials-provider/HEAD/install.sh &&
sudo AWCP_VERSION=3.1.1 bash "$installer" --config /path/to/config.tomlAWCP_VERSION is required and must name a released, tagged version. The script downloads the binary for your architecture from the artifact host and the service units and install scripts from the v$AWCP_VERSION tag, then hands off to the install script described in Step 2. It also accepts --dry-run, which downloads everything, keeps it, and prints where, without installing.
Download to a file rather than piping into a shell: bash -c "$(curl …)" exits 0 when the download fails, because the substitution is simply empty, so a failed install reads as a successful one. If you do use that form, options must go after a --, since the shell would otherwise consume the first one as $0.
As with Step 2, add the user account that your application runs under to the aws-wcp-token group so it can read the SSRF token file.
Run the following in an Administrator PowerShell session. If the download fails on an older host, run [Net.ServicePointManager]::SecurityProtocol = 'Tls12' first.
$installer = Join-Path $env:TEMP "awcp-install.ps1"
Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/aws/aws-workload-credentials-provider/HEAD/install.ps1 -OutFile $installer
& $installer -Version 3.1.1 -Config C:\path\to\config.toml
Remove-Item $installerDownload to a file rather than running the response directly: [scriptblock]::Create() on an empty body produces a script block that does nothing and reports success, so a truncated or empty download would read as a completed install.
If your execution policy refuses to run the file, or refuses the unsigned install scripts it downloads, run it as powershell.exe -ExecutionPolicy Bypass -File $installer -Version 3.1.1 -Config C:\path\to\config.toml. The script checks the policy before downloading anything and tells you the same thing.
The script verifies the Authenticode signature on the binary and passes -Config and -NoStart through to the install.ps1 script described in Step 2. It also accepts the following parameters:
-Version — Version to install; required, and may also be given as the AWCP_VERSION environment variable-Force — (Optional) Stop running provider services before installing-DryRun — (Optional) Download and verify, then stop without installingTo build the Workload Credentials Provider binary natively, you need the standard development tools and the Rust tools. Alternatively, you can cross-compile for systems that support it, or you can use Rust cross to cross-compile.
NOTE: To ensure a stable experience, use a specific git tag when building from source code. You can find a list of version tags here. Tags are in the pattern /v\d+\.\d+\.\d+/ and follow SemVer 2.0.0.
Example: git clone --branch https://github.com/aws/aws-workload-credentials-provider.git
NOTE: Building the provider with the fips feature enabled on macOS currently requires the following workaround:
SDKROOT which is set to the result of running xcrun --show-sdk-pathOn RPM-based systems such as AL2023, you can install the development tools by using the Development Tools group.
sudo yum -y groupinstall "Development Tools"Follow the instructions at Install Rust in the Rust documentation.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Follow the on-screen instructions
. "$HOME/.cargo/env"Build the provider using the cargo build command:
cargo build --releaseYou will find the executable under target/release/aws-workload-credentials-provider.
On Debian-based systems such as Ubuntu, you can install the developer tools using the build-essential package.
sudo apt install build-essentialFo
No open issues yet, or sync has not completed.