Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

aws-workload-credentials-provider

> AI 编程
Open source

The AWS Workload Credentials Provider (formerly the AWS Secrets Manager Agent) is a client-side solution that helps you standardize how you consume credentials

700 stars0 likes0 views
WebsiteGitHub

About

The AWS Workload Credentials Provider (formerly the AWS Secrets Manager Agent) is a client-side solution that helps you standardize how you consume credentials

AWS Workload Credentials Provider

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:

  • Secrets Manager — An HTTP interface for retrieving and caching secrets from AWS Secrets Manager. Supported on AWS Lambda, Amazon ECS, Amazon EKS, and Amazon EC2. Enabled by default.
  • Certificate Management — Automatic export and refresh of certificates from AWS Certificate Manager to the local filesystem. Supported on Amazon EC2 and on-premise hosts. Opt-in via configuration.

Secrets Manager capability

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.

Certificate Management capability

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

  • AWS Workload Credentials Provider
    • Secrets Manager capability
    • Certificate Management capability
    • Quick install
      • [ Linux quick install ]
      • [ Windows quick install ]
    • Step 1: Build the Workload Credentials Provider binary
      • [ RPM-based systems ]
      • [ Debian-based systems ]
      • [ Windows ]
      • [ Cross-compile natively ]
    • Step 2: Install the Workload Credentials Provider
      • [ Amazon EC2 (Linux) ]
      • [ Windows EC2 ]
      • [ Running as a Container Sidecar ]
      • [ AWS Lambda ]
    • Step 3: Retrieve secrets with the Workload Credentials Provider
      • [ curl ]
      • [ Python ]
    • refreshNow parameter behavior
    • Using the refreshNow parameter
      • Example - GET request with refreshNow parameter
        • [ curl ]
        • [ Python ]
    • Role chaining (cross-account access)
    • Pre-fetching
    • Step 4: Retrieve certificates with the Workload Credentials Provider
    • Configure the Workload Credentials Provider
    • Optional features
    • Logging
    • Security considerations
    • Running Integration Tests Locally
      • Prerequisites
      • Required AWS Permissions
      • Required IAM Roles (for role chaining tests)
      • Running Tests
        • Option 1: Using the test script
        • Option 2: Manual execution
      • Test Organization

Quick install

The 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.


[ Linux quick install ]

bash
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.toml

AWCP_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.


[ Windows quick install ]

Run the following in an Administrator PowerShell session. If the download fails on an older host, run [Net.ServicePointManager]::SecurityProtocol = 'Tls12' first.

powershell
$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 $installer

Download 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 installing

Step 1: Build the Workload Credentials Provider binary

To 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:

  • Create an environment variable called SDKROOT which is set to the result of running xcrun --show-sdk-path

[ RPM-based systems ]

  1. On RPM-based systems such as AL2023, you can install the development tools by using the Development Tools group.

    bash
    sudo yum -y groupinstall "Development Tools"
  2. Follow the instructions at Install Rust in the Rust documentation.

    bash
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Follow the on-screen instructions
    . "$HOME/.cargo/env"
  3. Build the provider using the cargo build command:

    bash
    cargo build --release

    You will find the executable under target/release/aws-workload-credentials-provider.


[ Debian-based systems ]

  1. On Debian-based systems such as Ubuntu, you can install the developer tools using the build-essential package.

    bash
    sudo apt install build-essential
  2. Fo

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustacmagentawsaws-certificate-manager

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.