Copies, compares/diffs, and merges AWS RDS parameter groups. This functionality is not provided by the aws cli tools nor Python SDK (boto3).
-
Requires:
-
Assumes:
- AWS credentials are provided outside of the script.
direnv
is recommended, info below.
- AWS credentials are provided outside of the script.
-
direnv
usage:- Have
direnv
installed.- Debian/Ubuntu:
sudo apt-get install direnv
- OSX:
brew install direnv
- Debian/Ubuntu:
- Have the
direnv
shell hook in your profile. - Have copied
.envrc.default
to.envrc
and have entered valid AWS credentials into the file. - Have allowed
direnv
to load the.envrc
file once in that directory (usingdirenv allow
).
- Have
epijunkie$ cd aws_rds_parameter_groups_utility/
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
epijunkie$ direnv allow
direnv: loading .envrc
direnv: export +AWS_ACCESS_KEY_ID +AWS_DEFAULT_REGION +AWS_SECRET_ACCESS_KEY
epijunkie$
epijunkie$ ./rds_param_group_util.py -h
usage: rds_param_group_util.py [-h] -a {compare,copy,diff,merge} -p
SOURCE_PARAM_GROUP [-s SOURCE_REGION] -d
DEST_PARAM_GROUP [-w DEST_REGION]
Cross AWS region capable for any action.
Compares two parameter groups and displays the differences, similar to diff.
OR
Copies a parameter group to a new destination.
OR
Merges parameters differences from the source parameter group to the destination
parameter group. Any parameter that does not exist in the destination is copied.
Any parameter that is different between the two is copied from the source OVER
the destination.
optional arguments:
-h, --help show this help message and exit
-a {compare,copy,diff,merge}, --action {compare,copy,diff,merge}
Action to take.
-p SOURCE_PARAM_GROUP, --parameter-group SOURCE_PARAM_GROUP
Source parameter group.
-s SOURCE_REGION, --source-region SOURCE_REGION
Source region of parameter group. Default: us-east-1
-d DEST_PARAM_GROUP, --dest-parameter-group DEST_PARAM_GROUP
Destination parameter group.
-w DEST_REGION, --dest-region DEST_REGION
Destination region of parameter group.
epijunkie$