This Python (3.6+) script is for migrating Amazon AWS System Manager (SSM) Parameter Store keys from one path to another.
To install the script do the following:
- Configure your AWS credentials
- Grab the code from this gist
- Make it executable (
chmod +x /path/to/copy-ssm-ps-path.py
) pip install boto3
(if you don't have it installed already)
Run it like so:
copy-ssm-ps-path.py source-tree-name target-tree-name new-kms-uuid
For more information about this script checkout my blog post Migrating AWS System Manager Parameter Store Secrets to a new Namespace.
Works great, example of usage in case the readme is not clear:
aws-mfa python3 duplicate-ssm.py app1/dev app1/preprod alias/aws/ssm
You should provide the namespaces without the first slash, you can refer to the KMS key by alias as above