title: Do we need to escape anything in "Fn::Base64: !Sub" in AWS?
body: <p>When we use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html" rel="nofollow noreferrer">Fn::Base64: !Sub |</a> for the UserData section in a YAML CloudFormation template, do we need to escape things like double quotes, backslashes and the like?</p>
  
  <p>Example syntax:</p>
  
  <pre><code>UserData:
    Fn::Base64:
      !Sub |
        #!/bin/bash -xe
        yum update -y aws-cfn-bootstrap
        /opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfig --configsets wordpress_install --region ${AWS::Region}
        /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource WebServerGroup --region ${AWS::Region}
  </code></pre>