Skip to main content

Simple Python wrapper for getting values from AWS Systems Manager Parameter Store

Project description

Simple Python wrapper for getting values from AWS Systems Manager Parameter Store

Build status Coverage Github license Python versions

Installation

Install the module with pip:

pip install ssm-parameter-store

Usage

All parameters are returned as a Python dict.

Getting a single parameter

aws ssm put-parameter \
--name "my_parameter_name" \
--value "value" \
--type SecureString
--region us-west-2
from ssm_parameter_store import EC2ParameterStore
store = EC2ParameterStore(region='us-west-2')
parameter = store.get_parameter('my_parameter_name', decrypt=True)
# parameter = {
#   'my_parameter_name': 'value'
# }

Credentials

ssm-parameter-store uses boto3 under the hood and therefore inherits the same mechanism for looking up AWS credentials. See configuring credentials in the Boto 3 documentation for more information.

Example: Method parameters

Pass all boto3 client parameters to the EC2ParameterStore constructor.

from ssm_parameter_store import EC2ParameterStore
store = EC2ParameterStore(
    aws_access_key_id=ACCESS_KEY,
    aws_secret_access_key=SECRET_KEY,
    aws_session_token=SESSION_TOKEN,  # optional
    region='us-west-2'
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssm-parameter-store-18.7.3.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

ssm_parameter_store-18.7.3-py2.py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page