title: How to format CloudFormation Task Definition command
body: <p>Hi I currently have a Task Definition resource as such:</p>
  <pre><code>  WebServerTaskDefinition:
      Type: AWS::ECS::TaskDefinition
      Properties:
        Family: !Ref TaskDefinitionName
        NetworkMode: awsvpc
        RequiresCompatibilities: 
          - FARGATE
        Cpu: !Ref TaskDefinitionCPU
        Memory: !Ref TaskDefinitionMemory
        ExecutionRoleArn: !Ref TaskDefinitionExecutionRole
        ContainerDefinitions: 
          - Name: !Ref ContainerName
            Image: !Ref ContainerImage
            Essential: true
            Cpu: 256
            EntryPoint: sh,-c
            Command: 
            PortMappings:
              - ContainerPort: !Ref ContainerPort
  </code></pre>
  <p>I would like to define <code>ContainerDefinitions</code> <code>Command</code> as</p>
  <pre><code>/bin/sh -c &quot;echo '&lt;html&gt; &lt;head&gt; &lt;title&gt;Amazon ECS Sample App&lt;/title&gt; &lt;style&gt;body {margin-top: 40px; background-color: #333;} &lt;/style&gt; &lt;/head&gt;&lt;body&gt; &lt;div style=color:white;text-align:center&gt; &lt;h1&gt;Amazon ECS Sample App&lt;/h1&gt; &lt;h2&gt;Congratulations!&lt;/h2&gt; &lt;p&gt;Your application is now running on a container in Amazon ECS.&lt;/p&gt; &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;' &gt;  /usr/local/apache2/htdocs/index.html &amp;&amp; httpd-foreground&quot;
  </code></pre>
  <p>Any suggestions how to put it into yaml? I am getting Template Format Error if I put place the command directly in the template</p>