Add AwsSystemsManagerParameterStoreSettingsSource #385
+307
−1
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 I'm adding
In a spirit similar to #175, this PR adds support for AWS Systems Manager Parameter Store. The name is a bit of a mouthful, but I errored on the side of verbosity and named the source
AwsSystemsManagerParameterStoreSettingsSource
. Something likeAwsSsmParameterStoreSettingsSource
might be better.For Pydantic v1, we have been using https://github.com/developmentseed/pydantic-ssm-settings/ on a number of projects, however having the functionality included in Pydantic Settings core seems preferred.
How I did it
I more or less copied the pattern of
AzureKeyVaultSettingsSource
.Uncertainties
The testing mocks out the AWS SSM Client, however typically I use something like moto to mock out the AWS services when testing. I wasn't sure about this project's appetite for the added test dependency.
Additionally, I was a bit uncertain about typing the
SSMClient
. Projects like boto3-stubs provide such types, however I wasn't sure about the project's appetite for adding this dependency.