Skip to content

Conversation

@jcyamacho
Copy link
Contributor

@jcyamacho jcyamacho commented Nov 17, 2025

Add support for AWS Secrets Manager VersionId parameter

Summary

Adds support for specifying a VersionId when retrieving secrets from AWS Secrets Manager, enabling retrieval of specific secret versions.

Changes

  • Added version_id parameter to AWSSecretsManagerSettingsSource constructor
  • Fixed handling of optional VersionId to only include it in the request when provided (prevents errors when version_id is None)

Implementation Details

  • The version_id parameter is optional and defaults to None
  • When version_id is provided, it's passed to the AWS Secrets Manager get_secret_value API call
  • The fix ensures VersionId is only included in the request dictionary when a value is provided, avoiding potential API errors

Files Changed

  • pydantic_settings/sources/providers/aws.py

@jcyamacho jcyamacho marked this pull request as ready for review November 17, 2025 20:33
@hramezani
Copy link
Member

Thanks @jcyamacho

@hramezani hramezani enabled auto-merge (squash) November 18, 2025 08:25
@hramezani hramezani merged commit 7b924d2 into pydantic:main Nov 18, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants