feat: batch fetching for AWS Secrets Manager provider#67
Merged
domenkozar merged 1 commit intocachix:mainfrom Mar 19, 2026
Merged
feat: batch fetching for AWS Secrets Manager provider#67domenkozar merged 1 commit intocachix:mainfrom
domenkozar merged 1 commit intocachix:mainfrom
Conversation
Override get_batch on AwssmProvider to use the AWS BatchGetSecretValue API, reducing N sequential GetSecretValue calls to ceil(N/20) batched calls. For a project with 30 secrets this means 2 API calls instead of 30, plus only 1 client construction instead of 30. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
get_batchonAwssmProviderto use the AWSBatchGetSecretValueAPI, reducing N sequentialGetSecretValuecalls to ceil(N/20) batched callsResourceNotFoundExceptionin error array as "secret not present" (consistent withget()returningNone), fail on other per-secret errorsIAM Note
Users need
secretsmanager:BatchGetSecretValuepermission in addition to the existingsecretsmanager:GetSecretValue. The docs IAM policy example and changelog have been updated accordingly.Test plan
build_batch_request_nameshelper (empty, basic, chunking at 45 keys)format_secret_nameedge cases (empty inputs, too long)cargo test --all --features awssm)SECRETSPEC_TEST_PROVIDERS=awssm cargo test --features awssm)🤖 Generated with Claude Code