Reputation: 1051
The below aws cli command returns the following
aws cloudformation describe-stacks --stack-name home-automation-service --region us-east-1 --query "Stacks[0].Outputs[*].{OutputKey:OutputKey,OutputValue:OutputValue}" --output json
[
{
"OutputKey": "URLPath",
"OutputValue": "https://home-automation-service.jakeworld.com"
},
{
"OutputKey": "Port",
"OutputValue": "8080"
}
]
I want to convert the json to resemble the following
{
"URLPath": "https://home-automation-service.jakeworld.com",
"Port": "8080"
}
Can this be done using the --query
parameter in the aws cli? If not, appreciate help using any other way of doing it?
Upvotes: 0
Views: 445