Issues for escaping brackets, backslash and double quotes on YAML Cloudformation

I originally posted the question on StackOverflow since I’m not sure where is the problem; if it is a YAML issue, a CloudFormation issue, or a Serverless framework issue. However, the testing I’ve been doing indicates to me that the problem may be related to the way Serverless is parsing the template.

Here is the issue:

I hope you can help me.

Thanks in advance.

This was solved. It can be tagged as a ‘Layer 8’ issue.

Check this link for the answer.