- Newest
- Most votes
- Most comments
So what do you want it to end up processed as? I see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-defaultsubstitutions describes this property as a String that's a JSON object. What you've got above looks valid for that.
Also have you had a look at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ToJsonString.html? It's interesting in that it shows JSON objects in the same format. Also it might be useful, but maybe overkill for such a simple object.
Thanks for your answer.
I was expecting:
"DefaultSubstitutions": { "S": { "Fn::Sub": "${S}" }, "H": { "Fn::Sub": "${H}" }, "F": { "Fn::Sub": "${F}" } },
I'll read through the links you've shared (thanks for those)
so I've tried:
DefaultSubstitutions: Fn::ToJsonString: { "S": !Sub "${S}", "H": !Sub "${H}", "F": !Sub "${F}", }
i get the error message:
Nested mappings are not allowed in compact mappings (YAML)
Incorrect type. Expected "string" (yaml-schema: DefaultSubstitutions)
also tried:
DefaultSubstitutions: !Join ['', [ '{', '"S":', !Sub "${S}", '"H":', !Sub "${H}", '"F":', !Sub "${F}" '}' ]]
which errors with: Incorrect type. Expected "string". (yaml-schema: DefaultSubstitutions)
I'm slowly coming to the conclusion that pinpoint is broken :-( My last attempt before giving up, the "long" form:
DefaultSubstitutions: >
{
"S": { "Fn:Sub": "${S}" },
"H": { "Fn:Sub": "${H}" },
"F": { "Fn:Sub": "${F}" }
}
goes through with no complaints from cloudformation, but I end up with this kind of substitutions in the outgoing email:
{Fn:Sub="${S}"}
{Fn:Sub="${H}"}
{Fn:Sub="${F}"}
which is really sad :-(
Relevant content
- asked 2 years ago
- asked 6 months ago
- How do I set up logging for Amazon Pinpoint voice messages for Amazon Pinpoint SMS and Voice v2 API?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- How do I set up logging for Amazon Pinpoint voice messages for Amazon Pinpoint SMS and Voice v1 API?AWS OFFICIALUpdated 2 years ago
Updated the post to include the actual target goal, and the simplified (getting to the bottom of it) tests :-)