title: CloudFormation Fn::Transform Operation: Lower -> syntax error
body: <p>I'm trying to create an AWS S3 Bucket with cloud formation.</p>
  <p>S3 bucket name needs to be lowercase but I want to use a paramenter to compound that name. This parameter comes uppercase.</p>
  <p>I founded a way.</p>
  <p>I read this.</p>
  <ul>
  <li><a href="https://github.com/awslabs/aws-cloudformation-templates/tree/master/aws/services/CloudFormation/MacrosExamples/StringFunctions" rel="nofollow noreferrer">https://github.com/awslabs/aws-cloudformation-templates/tree/master/aws/services/CloudFormation/MacrosExamples/StringFunctions</a></li>
  </ul>
  <p>This is my code:</p>
  <pre class="lang-yaml prettyprint-override"><code>Parameters:
  
  # Global
    ServiceName:
      Type: String
      Description: 'Service Name'
      Default: content-input
     
    Environment:
      Type: String
      Description: 'Environment Name'
  
  Resources:
    S3Bucket: 
      Type: AWS::S3::Bucket
      Properties:
        BucketName: !Join ['-',
        [ 
          content-input,
          'Fn::Transform':
            - Name: 'String'
            Parameters: 
              InputString: !Ref Environment
              Operation: Lower
        ]]
  </code></pre>
  <p>But I get this error.</p>
  <pre class="lang-sh prettyprint-override"><code>while parsing a flow node
  expected the node content, but found '-'
    in &quot;&lt;unicode string&gt;&quot;, line 157, column 11:
                - Name: 'String'
  </code></pre>
  <p>I tried this other syntax referered <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-transform.html" rel="nofollow noreferrer">here</a></p>
  <pre class="lang-yaml prettyprint-override"><code>Parameters:
  
  # Global
    ServiceName:
      Type: String
      Description: 'Service Name'
      Default: content-input
     
    Environment:
      Type: String
      Description: 'Environment Name'
  
  Resources:
    S3Bucket: 
      Type: AWS::S3::Bucket
      Properties:
        BucketName: !Join ['-',
        [ 
          content-input,
          'Fn::Transform':
            Name: 'String'
            Parameters: 
              InputString: !Ref Environment
              Operation: Lower
        ]]
  </code></pre>
  <p>But I get:</p>
  <pre class="lang-sh prettyprint-override"><code>while parsing a flow sequence
    in &quot;&lt;unicode string&gt;&quot;, line 154, column 7:
            [
            ^
  expected ',' or ']', but got ':'
    in &quot;&lt;unicode string&gt;&quot;, line 157, column 15:
                Name: 'String'
                    ^
  </code></pre>
  <p>Of Course, this work perfectly.</p>
  <pre class="lang-yaml prettyprint-override"><code>Parameters:
  
  # Global
    ServiceName:
      Type: String
      Description: 'Service Name'
      Default: content-input
     
    Environment:
      Type: String
      Description: 'Environment Name'
  
  Resources:
    S3Bucket: 
      Type: AWS::S3::Bucket
      Properties:
        BucketName: !Join ['-',
        [ 
          content-input,
          mytext
        ]]
  </code></pre>
  <p>How is the right syntax?</p>