title: AWS ECS cli command equivalent in boto3
body: <p>I'm trying to port in python an ECS services deployment that at the moment is done with a bunch of bash script containing commands like the following:</p>
  <pre class="lang-sh prettyprint-override"><code>ecs-cli compose -f foo.yml -p foo --cluster bar --ecs-params &quot;dir/ecs-params.yml&quot; service up
  </code></pre>
  <p>I thought that the easiest/fastest way could be using boto3 (which I already extensively use elsewhere so It's a safe spot), but I didn't understand from the <a href="https://boto3.amazonaws.com/v1/documentation/api/1.9.88/reference/services/ecs.html" rel="nofollow noreferrer">documentation</a> what would be the instruction equivalent of the formerly written command.</p>
  <p>Thanks in advance.</p>
  <p><strong>UPDATE:</strong> this is the content of <code>foo.yml</code>:</p>
  <pre><code>version: '3'
  services:
    my-service:
      image: ecr-image:version
      env_file:
        - ./some_envs.env
        - ./more_envs.env
      command: python3 src/main.py param1 param2
      logging:
        driver: awslogs
        options:
          awslogs-group: /my-service-log-group
          awslogs-region: my-region
          awslogs-stream-prefix: my-prefix
  </code></pre>
  <p><strong>UPDATE2</strong>: this is the content of <code>dir/ecs-params.yml</code>:</p>
  <pre><code>version: 1
  task_definition:
    task_role_arn: my-role
    services:
      my-service:
        cpu_shares: my-cpu-shares
        mem_reservation: my-mem-reservation
  </code></pre>