Skip to content

Commit

Permalink
Feature/add ssm param util code (#140)
Browse files Browse the repository at this point in the history
* Adding code to instantiate a vespa search adapter from ssm params.

* updating to allow param names.

* Adding type hints and return types.

* Bumping the version.

* Removing the get_vespa_search_adapter_from_aws_secrets function and tests.

* removing the test_ssm module.

---------

Co-authored-by: Mark <[email protected]>
  • Loading branch information
THOR300 and Mark authored Oct 30, 2024
1 parent 72c7c77 commit e698a36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/cpr_sdk/ssm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import boto3


def get_aws_ssm_param(param_name: str, region_name: str = "eu-west-1") -> str:
"""Retrieve a parameter from AWS SSM"""
ssm = boto3.client("ssm", region_name=region_name)
response = ssm.get_parameter(Name=param_name, WithDecryption=True)
return response["Parameter"]["Value"]
2 changes: 1 addition & 1 deletion src/cpr_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_MAJOR = "1"
_MINOR = "9"
_PATCH = "1"
_PATCH = "2"
_SUFFIX = ""

VERSION_SHORT = "{0}.{1}".format(_MAJOR, _MINOR)
Expand Down

0 comments on commit e698a36

Please sign in to comment.