Skip to main content

aws-ssm-commander

Build Status

Inspired by aws-ssm-tree

Install

pip install aws-ssm-commander

Usage

Options:
  --debug
  --help   Show this message and exit.

Commands:
  dump   Dump the values in ssm to a param file, for backup or inspection.
  tree   Print out a tree of your SSM parameters
  write  take a yaml file, put it in to SSM

dump

Dumps the params on a path to a json or yaml output

~> aws-ssm-commander dump /abc/123
section_a:
  username: abc123
section_b:
  password: blah
  username: foobar

tree

See a visual representation of params on a path. Useful for making sure your params out in SSM are structured as expected

~> aws-ssm-commander tree /abc/123/
abc
└── 123
    ├── section_a
    │   └── username
    ├── section_b
    │   ├── password
    │   └── username

write

Takes a yaml input file and a path prefix, and writes params to SSM.

~> aws-ssm-commander write /abc/123/ my_file.yml

Saving secrets

There are two ways of saving secrets. First is by supplying a KMS key ID along with the value to encrypt. The second is to use custom KMS to store kms blobs. The former is less secure than the latter.

Supplying a KMS key ID along with the value to encrypt

A KMS key ID can be supplied:

password: kms_key_id: f0e79e90-5672-431d-b100b-84b8ac8f1525 value: supersecretpassword

Keep in mind that if the params file is in git, the secret will be exposed in plain text!

Using custom KMS keys to store kms blobs in the yaml file

A lot of the stuff you want to put in Param Store are secrets, and you don't store plaintext secrets in git! Now you could encrypt and decrypt these files on your own, but aws-ssm-commander supports putting a KMS blob in a config file. To use this method, you must use a Customer Managed KMS key.

You can put a KMS secret in your config files by prefixing a value with a !kms tag

To get a kms blob,

KEY_ID=1234abcd-12ab-34cd-56ef-1234567890ab
aws kms encrypt --key-id $KEY_ID --plaintext "MY_SECRET" --output text --query CiphertextBlob 

take that output, then drop it in a value in a yaml file like so:

my_thing:
  username: foobar
  password: !kms WW05aWJHRjNZbXh2WWc9PQ==

Metadata

Release files for aws-ssm-commander 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-ssm-commander 0.0.4
File Size Uploaded
aws-ssm-commander-0.0.4.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-ssm-commander 0.0.4
File Interpreter ABI Platform
aws_ssm_commander-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / aws-ssm-commander-0.0.4.tar.gz

Download URL aws-ssm-commander-0.0.4.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
67ba6b498ae497e2d5455a22f20a7c12755431939f889e83bbe14e8b4943ca1a
BLAKE2b-256 checksum
How to use checksums
b771c43c184a010e1d14af9e2f61c543335a95f64b1a9e142e4a4b9a08bb9734
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / aws_ssm_commander-0.0.4-py3-none-any.whl

Download URL aws_ssm_commander-0.0.4-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0594798f3e3f24c946b4a5cd2f10fff09a8d1285560f83aa67d72f687c8fa38
BLAKE2b-256 checksum
How to use checksums
e61adcee84c17c1d06032e8cfbde2e9d403506aed9fd9a68969e8fe5dc62bea5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page