pass in a encrypted file and kms key id, the package will decrypt the data, and upload the contents to aws ssm.
Project description
ssm_mass_uploader
Command line tool that will encrypt ssm secrets locally via AWS KMS and uploads encrypted data to ssm.
How to use
- You create a secrets file on your local machine. Example.
{
"secrets": [
{
"Name": "/super/secret/parameter",
"Value": "42",
"Type": "SecureString",
"Overwrite": true
}
]
}
For parameter options see boto 3 put parameter docs
- Encrypting the file locally
python -m ssmu -e -k {kms_id} -f path/to/file/{unencrypted_file.json} -s {stage} --o path/to/save
will output a file named secret.{stage}
- Upload the encrypted file to ssm
python -m ssmu -u -k {kms_id} -f path/to/file/secret.stage -s stage
Note: Windows and linux \ vs /
json to put in 'secrets_to_upload'
Note: Tags are not required, but if you do include them, then the key values are required
{
"Name": "String [REQUIRED]",
"Description": "String [NOT REQUIRED]",
"Value": "String [REQUIRED]",
"Type": "String'|'StringList'|'SecureString [REQUIRED]",
"KeyId": "String [NOT REQUIRED]",
"Overwrite": "BOOLEAN [NOT REQUIRED]",
"AllowedPattern": "String [NOT REQUIRED]",
"Tags": [
{
"Key": "String [REQUIRED]",
"Value": "String [REQUIRED]"
}
],
"Tier": "'Standard'|'Advanced'|'Intelligent-Tiering' [NOT REQUIRED]",
"Policies": "String [NOT REQUIRED]",
"DataType": "String [NOT REQUIRED]"
}
Examples
Basic Examples
{
"secrets": [
{
"Name": "/this/is/super/secret",
"Value": "shhhh",
"Type": "String"
}
]
}
{
"secrets": [
{
"Name": "/this/is/super/secret",
"Value": "shhhh",
"Type": "SecureString"
}
]
}
Example with Tags
{
"secrets": [
{
"Name": "/this/is/super/secret",
"Value": "shhhh",
"Type": "String"
},
{
"Name": "/this/is/another/secret",
"Value": "hmmmm",
"Type": "SecureString",
"Tags": [
{
"Key": "Project Name",
"Value": "Project X"
}
]
}
]
}
Example allowing overwrites, secure string, and tags
Note: You cannot used Overwrite and tags in the same call. You should either add tags on first creation, or add / remove tags later on.
{
"secrets": [
{
"Name": "/this/is/super/secret",
"Value": "new secret",
"Type": "String",
"Overwrite": true
},
{
"Name": "/this/is/another/secret",
"Value": "hmmmm",
"Type": "SecureString",
"Tags": [
{
"Key": "Project Name",
"Value": "Project X"
}
]
}
]
}
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
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 ssm_mass_uploader-0.1.1.tar.gz.
File metadata
- Download URL: ssm_mass_uploader-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fd2b99d60867997fa9ae604dd79a83680a7af0fb584491390bfdb53f6f83a11
|
|
| MD5 |
e09400878f85906752d1236f1e6e2718
|
|
| BLAKE2b-256 |
f8485a6500ae1e37836b442f21e6e83ba5bc1bcd40d5c5e51ccb17c937f528c4
|
File details
Details for the file ssm_mass_uploader-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: ssm_mass_uploader-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e2024f1cd8874a4be1ae35a06ec643a2da9556569a8bb293a88d97e45db26a6
|
|
| MD5 |
ebe0a9f5464581e21aad6794082af373
|
|
| BLAKE2b-256 |
354208e81a16462b80e2435d1a7cafcba7f0458384b75ab8beeacfabb69cd64e
|