title: Can't write the content of a file in UserData AWS EC2 cloudformation
body: <p>I want to get the content of a file in the UserData without providing inline content as following, but I'm getting the path of the file in the content when the ec2 boots instead of the content of the file.</p>
  
  <p>Here's a snippet of my template:</p>
  
  <pre><code>  ServiceInstance:
      Type: "AWS::EC2::Instance"
      Properties:
        . . . 
        UserData:
          'Fn::Base64': !Sub |
            #cloud-config
            write_files:
              - path: /etc/sysconfig/cloudformation
                permissions: 0644
                owner: root
                content: |
                  STACK_NAME=${AWS::StackName}
                  AWS_REGION=${AWS::Region}
              - path: /etc/path-to-file/conf.yaml
                permissions: 0644
                owner: root
                content: "@file://./config/conf-${Env}.yaml"
            runcmd:
              ## run some commands
  </code></pre>
  
  <p>when I ssh to ec2 and check the file content I get this:</p>
  
  <pre><code>[ec2-user@ec2ip ~]$ cat /etc/path-to-file/conf.yaml
  @file://./config/conf-dev.yaml
  </code></pre>
  
  <p>I checked this <a href="https://cloudinit.readthedocs.io/en/latest/topics/modules.html#write-files" rel="nofollow noreferrer">cloud init docs</a>, but can't find something related.
  any idea what did I do wrong in here ?</p>