Pass AWS SSM parameters as environment variables when executing a process
Project description
ssmenv2exec
Populate environment variables from AWS Systems Manager Parameter Store parameters before executing a process.
This allows application configuration to be stored in SSM rather than on the EC2 instance or Docker container.
Usage
pip install ssmenv2exec
Now you can use the ssmenv2exec script from the command line to execute your process
and have the environment populated from an AWS SSM Parameter store path.
For example, in parameter store you can create parameters using a common path.
/app/myapp/DB_USER
/app/myapp/DB_PASS
/app/myapp/DB_URL
/app/myapp/SECRET_KEY
Then you can use ssmenv2exec to execute your program and the initial environment
will contain values for DB_USER, DB_PASS, DB_URL and SECRET_KEY. If any of
those already exist as environment variables they will not be overridden.
ssmenv2exec /app/myapp python app.py
ssmenv2exec will grab all parameters from the Parameter Store under the
/app/myapp path and pass those as environment variables to the process. An
exec call is used so that the process id (pid) remains consistent, which is
useful for containerized environments.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssmenv2exec-0.0.1.tar.gz.
File metadata
- Download URL: ssmenv2exec-0.0.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
678be0831ffbe74442bae79f980f9192ec4ce27dff45da74c6d1d9a85dfa06b6
|
|
| MD5 |
104d7652bb8d3c0f0a37c937414ec341
|
|
| BLAKE2b-256 |
b9a22fdac95d49ddb9d5c3e6abf242c3b58f5f5dadb29ba064a8d173ffb5c014
|
File details
Details for the file ssmenv2exec-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ssmenv2exec-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c8faeb0a3a90e8df901f2b92a2e81d5f4fc3f6cf895bddf163c9e4812e5aaf
|
|
| MD5 |
d50d467a5ddb31389d7139dd8f14ba8b
|
|
| BLAKE2b-256 |
d02945629d18429718b85b105ef44e0193f473d133fe8bcea2cdf862d61b0bcb
|