In this example from AWS docs we have a UserData field that allows a multiline string, using the following syntax:
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
yum update -y aws-cfn-bootstrap
/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfig --region ${AWS::Region}
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource WebServerGroup --region ${AWS::Region}
What does !Sub | mean here, especially the pipe character? The corresponding JSON uses "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ instead, but in the YAML, !Sub | is used.
Is the pipe character standing for a newline, saying lines must joined by newlines?