Quick, simple AWS Parameter Store CLI for listing/reading params with tab completion
Project description
Quick, simple AWS Parameter Store CLI for listing/reading params with tab completion
Background
The AWS-provided tools for using Parameter Store (the web UI and awscli) are fine if you know exactly what you’re trying to find. They’re not so good if you’re… looking… for something, and want to explore your Parameter Store parameters like a filesystem, or hierarchical datastore. This is a dead-simple, quick, and rather ugly hack of a CLI built in Python and largely inspired by the Hashicorp Vault CLI, plus shell completion for parameter paths. This doesn’t write parameters or do other “fancy” things. It’s mainly intended for teams who are also using Parameter Store to replace human-centered secret stores (i.e. Vault, KeePass, random encrypted files, etc.) and often have only a vague idea of the exact parameter name they’re looking for.
Status
This is a somewhat-tipsy Friday evening quarantine project. There are (it’s almost painful to write this) no unit tests, and it’s largely cargo-culted from previous work of mine. I’ll gladly accept PRs assuming they look correct, meet PEP8/PyFlakes style, and are relatively straightforward and working. That’s about the end of “support”.
Requirements
This project requires Python 3.6 or later, as it makes use of both PEP484 type hints and PEP498 f-strings. It also requires boto3, argcomplete, and appdirs.
Installation
psread can be installed with pip install psread or python -mpip install psread
To set up autocompletion in your shell, either activate global completion for argcomplete, or for bash, set up completion for this project specifically. To do that in just your current shell:
eval "$(psread --bash-wrapper)"
To do that permanently (recommended):
echo -e "eval \"\$($(which psread) --bash-wrapper)\"" >> ~/.bashrc
Usage
There are two main functionalities: listing parameters and reading parameters. Shell tab completion is included, primarily for bash, via the argcomplete package.
Parameter Caching
PSREAD_CACHE_PATH defaults to psread.pkl within your platform-specific user cache directory (your cache file path is included in the psread -V output).
PSREAD_CACHE_TTL in seconds; defaults to 86400 (1 day).
Debugging
export PSREAD_LOG=DEBUG
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
Hashes for psread-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2efa8f02471b924cdd77ad65aed908452ab09932b0f118fef4104242c35688f |
|
MD5 | acb61fb9465be50ba9f73dca81d1be4f |
|
BLAKE2b-256 | 458c0652f880b54384ae333a4ebf0b64efcbda23fcf22104e23895cf4afd9979 |