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
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
Built Distribution
Close
Hashes for ssm-parameter-store-18.7.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5118aa8b5cd067d0fa72f44776dc2be61f7050357c7ff986f1be89705a7d45 |
|
MD5 | 1c962e2938948f53c9fe6b05f9e8c9dc |
|
BLAKE2b-256 | 50c8106d34063be69de5cb162d4b9d102e188e4b678ebe845d745a9d6c31bc32 |
Close
Hashes for ssm_parameter_store-18.7.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10710309ba8b3f4afee3b952e9fda3ae59073a131cccc72c315b79c60aaec495 |
|
MD5 | e68fe5bcae820615abd837d119ff792a |
|
BLAKE2b-256 | 4542fa2b41370378e6d9386608c474f83ea6d956c6b9955cce4a13d35bb25211 |