This project synthesises
- a CDK Pipeline with a Code Build Step which is fed some JSON that contains tokens in its environment variables,
- a Code Pipeline with a Code Build Step which is fed some JSON that contains tokens in its environment variables,
The JSON with tokens is the same bit of code.
The CDK Pipeline's Code Build Step Template is correct. It's a Fn::Base64 of a Fn::Sub, the JSON is singly encoded:
"{\"key\": \"value\"}"
The Code Pipeline's Code Build Step Template is NOT correct. It is also a Fn::Base64 of a Fn::Sub, but the JSON is double encoded:
"{\\\"key\\\": \\\"value\\\"}"