Repository navigation
Conversation
Add temporalio.contrib.aws.secrets_manager, an envconfig extension that loads Temporal client credentials (API key and/or TLS material) from AWS Secrets Manager. The user configures secret IDs (names or ARNs) under profile.<profile>.ext.aws_secrets_manager in the TOML config or via TEMPORAL_EXT_AWS_SECRETS_MANAGER_* environment variables, and the extension's client plugin fetches the secret material when a client connects. Secrets are fetched through the AWS Parameters and Secrets Lambda Extension if it is detected, and otherwise directly with boto3, which is available via the new boto3 extra. Fetched secrets are TTL-cached, with fallback to the last fetched value during Secrets Manager outages. The cache isn't bound to an event loop, so it can be shared across clients on different loops, such as the per-invocation loops of a Lambda worker. The API key is refreshed in the background while a client is connected; TLS material is only fetched on connect, since the bridge doesn't yet support dynamic client certificates. Logs and metrics match the Go implementation. See the README for details. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Load the Lambda worker's client config with the AWS Secrets Manager envconfig extension, so client credentials can be configured as Secrets Manager secret IDs. The client plugin list is now copied per invocation, so plugins appended in the configure callback don't accumulate across invocations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tconley1428
reviewed
Nov 19, 2026
| "protobuf<7", | ||
| ] | ||
| aioboto3 = ["aioboto3>=10.4.0", "types-aioboto3[s3]>=10.4.0"] | ||
| boto3 = ["boto3>=1.26.0,<2"] |
Contributor
There was a problem hiding this comment.
Why are we adding a separate boto3 dependency? Notably aioboto3 is right above it, why doesn't that work?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
The aws.secrets_manager module defines a new envconfig extension to support Temporal client credentials stored in AWS Secrets Manager. The user specifies a secret ARN or friendly name via envconfig (TOML or environment variables), and the client will automatically fetch the secret material from Secrets Manager. Periodic refreshes are only supported for API keys for now, with TLS cert rotation support deferred to later since there's no easy way to do it right now.
The AWS Parameters and Secrets Lambda Extension is used if detected in the environment. Otherwise, secrets are retrieved directly from Secrets Manager.
See the README or package documentation for usage details.
The Lambda worker module now uses the secretsmanager envconfig extension to support Temporal credentials in AWS Secrets Manager within Lambda workers.
Also see the Go reference implementation:
Why?
The aws.secrets_manager extension is intended to be used with the Lambda worker module (and in the future other serverless providers), to make it more convenient to store worker secrets in a secrets manager when using serverless. This makes it more convenient to store worker secrets in a secrets manager when using serverless.
Checklist
How was this tested:
Added new unit tests. Also did Claude-assisted E2E verification with a serverless Lambda worker setup configured to read credentials from Secrets Manager (under multiple configurations, including with/without the Lambda extension fetcher, with/without TLS client cert bundling, and using TOML/env vars).
Any docs updates needed?
The associated in-repo docs are updated. This specific module is primarily an implementation detail for the Lambda worker integration with Secrets Manager. We'll probably want to update our public docs for Lambda workers, but that can be done later. We may also want to update the associated sample code in samples-typescript to at least mention this integration as an option.