title: How to configure ephemeral storage on ECS Fargate Task via Ruby SDK?
body: <p>I'm using the Ruby SDK for AWS ECS to kick-off a task hosted in Fargate via <a href="https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Client.html#run_task-instance_method" rel="nofollow noreferrer"><code>run_task</code></a> method. This all works fine with the defaults — I can kick off the task OK and can send along custom command parameters to my Docker container:</p>
  <pre class="lang-rb prettyprint-override"><code>client = Aws::ECS::Client.new(region: region)
  client.run_task({
    cluster: fargate_cluster_name,
    task_definition: task_definition,
    launch_type: 'FARGATE',
    network_configuration: {
      awsvpc_configuration: {
        subnets: my_subnets,
          security_groups: my_security_groups,
          assign_public_ip: 'ENABLED',
        },
    },
    overrides: {
      container_overrides: [
        {
          name: my_container_name,
          command: command_params
        }
      ]
    }
  })
  </code></pre>
  <p>For some runs, I need a large disk size than the default &amp; want to set this via the <a href="https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ECS/Types/EphemeralStorage.html" rel="nofollow noreferrer"><code>ephemeral_storage</code></a> parameter in the SDK. I've tried this:</p>
  <pre class="lang-rb prettyprint-override"><code>client = Aws::ECS::Client.new(region: region)
  client.run_task({
    cluster: fargate_cluster_name,
    task_definition: task_definition,
    launch_type: 'FARGATE',
    network_configuration: {
      awsvpc_configuration: {
        subnets: my_subnets,
          security_groups: my_security_groups,
          assign_public_ip: 'ENABLED',
        },
    },
    overrides: {
      container_overrides: [
        {
          name: my_container_name,
          command: command_params
        }
      ],
      ephemeral_storage: {
        size_in_gi_b: 200
      }
    }
  })
  </code></pre>
  <p>But it doesn't work (I'm running <code>df -H</code> within my entrypoint and can see that the storage doesn't increase).</p>
  <ul>
  <li>I know that the <code>ephermal_storage</code> property is in the right place in my call, as if I move it the SDK gives an error.</li>
  <li>I know that the <code>size_in_gi_b</code> value is correct, as if I change it (e.g. <code>size_in_gib</code>) I also get an error.</li>
  <li>I am running with platform version <code>1.4.0</code></li>
  <li>There are no errors or warnings in Cloudwatch that the property can't be set e.g. (the task runs fine, just then runs out of disk space).</li>
  <li>I can't find anything in the docs for how to fix this.</li>
  </ul>
  <p>How should ephemermal storage be set for ad hoc task execution via the Ruby SDK? (I'm looking for the SDK equivalent <a href="https://aws.amazon.com/blogs/containers/amazon-ecs-on-aws-fargate-now-enables-customers-to-configure-ephemeral-storage-up-to-200gib/" rel="nofollow noreferrer">to this blogpost by AWS</a>, rather than an alternative solution e.g. mounting EFS or running via EC2)</p>