I got it working by using jq instead of sed, thanks for the great guide! Here's an example on how to use jq to manipulate the json for anyone else stuck on the tricky regex of sed
tmp=${mktemp} jq '.ViewerCertificate.SSLSupportMethod = "sni-only"' config.json > "$tmp" && mv "$tmp" config.json
One issue is that it's tricky to get environment variables in jq so I just hardcoded everything I need to update in the cloudfront distro.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I got it working by using jq instead of sed, thanks for the great guide! Here's an example on how to use jq to manipulate the json for anyone else stuck on the tricky regex of sed
One issue is that it's tricky to get environment variables in jq so I just hardcoded everything I need to update in the cloudfront distro.