title: Multi-line bash script in yaml for EC2 Image Builder
body: <p>I'm trying to create a custom component document. While I've tested the yaml file using various yaml linters, EC2 Image builder is complaining with the below error</p>
  <pre><code>Failed to create component. Fix the error(s) and try again:
  The value supplied for parameter 'data' is not valid. Parsing step 'ConfigureMySQL' in phase 'build' failed. Error: line 4: cannot unmarshal map into string.
  </code></pre>
  <p>And I'm unable to figure out what is wrong with my yaml file</p>
  <pre><code>name: MyJavaAppTestDocument
  description: This is JavaApp Document
  schemaVersion: 1.0
  
  phases:
    - name: build
      steps:
        - name: InstallSoftware
          action: ExecuteBash
          inputs:
            commands:
              - sudo yum update -y
              - sudo yum install -y java-1.8.0
              - sudo amazon-linux-extras install -y tomcat8.5
              - sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
              - sudo yum install -y mysql-community-server
        
        - name: ConfigureTomcat
          action: ExecuteBash
          inputs:
            commands:
              - sudo sed -i 's/&lt;\/tomcat-users&gt;/\n&lt;role rolename=&quot;manager-gui&quot;\/&gt;\n  &lt;role 
                rolename=&quot;manager-script&quot;\/&gt;\n  &lt;role rolename=&quot;admin-gui&quot;\/&gt;\n  &lt;user username=&quot;admin&quot; 
                password=&quot;admin&quot; roles=&quot;manager-gui,manager-script,admin-gui&quot;\/&gt;\n&lt;\/tomcat-users&gt;/' 
                /etc/tomcat/tomcat-users.xml
              - sudo systemctl start tomcat
              - sudo systemctl enable tomcat
        
        - name: ConfigureMySQL
          action: ExecuteBash
          inputs:
            commands:
              - sudo systemctl start mysqld
              - sudo systemctl enable mysqld
              - mysqlpass=$(sudo grep 'temporary password' /var/log/mysqld.log | sed 's/.*root@localhost: //')
              - mysql -u root -p$mysqlpass --connect-expired-password -h localhost -e &quot;ALTER USER 'root'@'localhost' IDENTIFIED BY 'whyDoTh1s@2020'&quot;
              - |
                sudo cat &lt;&lt;EoF &gt; /tmp/mysql-create-user.sql
                CREATE USER 'admin'@'%' IDENTIFIED BY 'whyDoTh1s@2020';
                GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
                EoF
  
              - sudo mysql -u root -pwhyDoTh1s@2020 -h localhost &lt; /tmp/mysql-create-user.sql
  </code></pre>
  <p>Appreciate if someone could help me find the error. The objective is to build an AMI with pre-configured software and settings.</p>