Skip to main content

A CLI to easily search for SSM parameters

Project description

Because Amazon made it difficult to search for SSM parameters by name in the AWS console, I created this small tool.

Motivation Elaborated On

Let’s say you have a SSM parameter name like the following:

/dev/another-prefix/my-really-long-service-name/MYSQL_CONNECTION_STRING

But when you go to search for it you can only remember “long-service”, in the AWS Console you can only search by names that BEGIN with a string, so you would have to remember nearly the whole string to search that way!

Installation

$ pip install ssm-search

Usage

$ ssm-search -s long-service
SSM Search version 0.1.1
Searching SSM for ['long-service']
/dev/another-prefix/my-really-long-service-name/MYSQL_CONNECTION_STRING -> (SecureString)
/dev/another-prefix/my-really-long-service-name/LOG_LEVEL -> Warning
Found 2 matches out of 513 parameters from SSM

# search on both "long-service" and "connection", by the way it's case insensitive
$ ssm-search -s long-service -s connection
SSM Search version 0.1.2
Searching SSM for ['long-service', 'connection' ]
/dev/another-prefix/my-really-long-service-name/MYSQL_CONNECTION_STRING -> (SecureString)
Found 1 matches out of 513 parameters from SSM

If you need to specify an AWS profile to use, just add --profile dev (etc).

Results are cached to local disk for a short period to make subsequent requests faster. By default this is 5 minutes but can be changed by setting an environment variable SSM_SEARCH_MAX_CACHE. To force it to load without cache, add the --no-cache argument.

Publishing Updates to PyPi

For the maintainer - to publish an updated version of ssm-search, increment the version number in version.py and run the following:

docker build -f ./Dockerfile.buildenv -t ssm-search:build .
docker run --rm -it --entrypoint make ssm-search:build publish

At the prompts, enter the username and password to the pypi.org repo.

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

ssm-search-0.1.5.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file ssm-search-0.1.5.tar.gz.

File metadata

  • Download URL: ssm-search-0.1.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.15

File hashes

Hashes for ssm-search-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5ac7100618e62aa97b1891362d697342c2b1818330091cd17e366de2488653d8
MD5 a7c7fe205c28b51466b06cfe5898b833
BLAKE2b-256 28f72666b7b9ae93d66da4e62f2c74fec826e162c2f19889c1e27d920b5587f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page