Last active
June 27, 2023 10:10
-
-
Save themegabyte/3f0e9673ce9d07211aa8268b415b22ee to your computer and use it in GitHub Desktop.
AWS SSM Migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ssm get-parameters-by-path --recursive --path "/CodeBuild/" --max-items 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Courtesy: https://stackoverflow.com/a/54787665/2432830 | |
for (const value of params.Parameters) { | |
const { Name, Value } = value; | |
console.log(`aws ssm put-parameter --name "${Name}" --value "${Value}" --type "String"`); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Parameters": [ | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
}, | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
}, | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
}, | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
}, | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
}, | |
{ | |
"Name": "/CodeBuild/test-val", | |
"Type": "String", | |
"Value": "myval", | |
"Version": 1, | |
"LastModifiedDate": "xxx", | |
"ARN": "arn:aws:ssm:eu-north-1:000000000000:parameter/CodeBuild/test-val", | |
"DataType": "text" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment