title: Using Ref as the first argument in Fn::Sub intrinsic function
body: <p>I experience quite strange issues when compiling the template, where I reference a string parameter in <code>Fn::Sub</code>, while the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html" rel="noreferrer">docs</a> do explicitly say that one can use <code>Ref</code> function inside of <code>Fn::Sub</code>. Here is a piece of template:</p>
  
  <pre><code>"Resources": {
      "LaunchConfiguration": {
        "Type" : "AWS::AutoScaling::LaunchConfiguration",
        "Properties" : {
          "UserData": { "Fn::Base64": { "Fn::Sub": { "Ref": "UserDataParam" } } },
  </code></pre>
  
  <p>And here is an error I get: </p>
  
  <blockquote>
    <p>Template error: One or more Fn::Sub intrinsic functions don't specify
    expected arguments. Specify a string as first argument, and an
    optional second argument to specify a mapping of values to replace in
    the string</p>
  </blockquote>
  
  <p>When I use full notation: <code>{ "Fn::Sub": [ { "Ref": "UserDataParam" }, {} ] }</code>, I get exactly the same error. Has anybody had the same issue? And is it possible to avoid it while still using the parameter?</p>