These scripts allow you to export and import AWS SSM parameters to and from a JSON file. The export script retrieves SSM parameters and saves them into a JSON file, while the import script reads from this JSON file and re-creates the parameters in AWS SSM.
- AWS CLI installed and configured
- jq installed for JSON processing
- Appropriate AWS IAM permissions to read and write SSM parameters
This script exports AWS SSM parameters to a JSON file.
./export_ssm_params_to_json.sh [-p | --pathTemplate <path>] [-h | --help]
-p, --pathTemplate
: Specify the path template for SSM parameters. If not provided, all parameters will be pulled.-h, --help
: Display the help message.
./export_ssm_params_to_json.sh -p /my/custom/path
If no path template is provided, the script will pull all parameters.
This script imports AWS SSM parameters from a JSON file created by the export script.
./import_ssm_params_from_json.sh [-h | --help]
-h, --help
: Display the help message.
./import_ssm_params_from_json.sh
-
Configure AWS CLI: Authenticate AWS CLI with first account.
aws configure
-
Export SSM Parameters: Run the export script to save SSM parameters to
parameters.json
../export_ssm_params_to_json.sh -p /my/custom/path
-
Configure AWS CLI: Authenticate AWS CLI with first account.
aws configure
-
Import SSM Parameters: Run the import script to read from
parameters.json
and recreate the parameters in AWS SSM../import_ssm_params_from_json.sh
- Ensure that
jq
is installed and accessible in your PATH. - Ensure that you have the necessary IAM permissions to read and write SSM parameters.
This project is licensed under the MIT License - see the LICENSE file for details.