Utilities for interacting with AWS Parameter Store. aws configure
should be run beforehand for proper operation.
- Python 3.5 or above
- The AWS CLI
- A successful run of
aws configure
Get the names and values of parameters whose names begin with a given prefix. Uses aws ssm describe-parameters
and get-parameters
, to compile names and values into a convenient format.
For example, passing the prefix foo
would fetch parameters named foo.A
, foo.B
etc. but not bar.foo
.
-
python fetch_params.py foo
Writes matching parameters to STDOUT.
Create a parameter or update an existing one. Can also be used with an input file to create / update multiple parameters simultaneously.
-
python set_param -p foo -v bar
Creates a parameter named
foo
with valuebar
. By default, uses theSecureString
parameter type -
python set_param -p foo -v bar -t String
Creates a parameter named
foo
with valuebar
with typeString
. Valid types:String
StringList
SecureString
-
python set_param -p foo -v bang -o
Overwrite
foo
's value tobang
. -
python set_param -j parameters.json
Create or update parameters from the file
parameters.json
containing parameter data in the format:[ { "Name": "foo", "Value": "bar" }, { "Name": "this", "Value": "that" } ]
Type
andOverwrite
keys can also be included for each parameter. If omitted, these options default toSecureString
andFalse
.
Get the names of available clusters and services.
-
python list_ecs_services.py
To print names of all available clusters and services
-
python list_ecs_services.py --arn
To print full ARNs of all available clusters and services
Get the private DNS of an ECS instance for a given cluster and service.
-
python get_ecs_url.py foo bar
This would return the URL of the first ECS instance for the first running task of the service whose name contained 'bar' in the cluster whose name contained 'foo'.
Utilities for interacting with git / GitHub
- git
Clone and update repos according to settings file. See script for settings file format.
For each item in the repos
file:
- Clone the repo if the named directory doesn't already exist
- If a
venv_name
value is present:- Create a new venv with this name if it doesn't already exist
- Activate environment
- Install
requirements.txt
- Deactivate environment
. bootstrap_repos.sh /path/to/repos.txt
comp
(CheckOut Master, Pull)
For each repo in settings file, checkout most up to date master if there are no uncommitted changes.
. comp.sh /path/to/repos.txt
The test suite can be run using:
nosetests .\tests\