title: ECS CLI efsVolumeConfiguration Docker Compose / ECS Params yml
body: <p>I have a service on ECS deployed through <code>ecs-cli compose service up</code></p>
  
  <p>The ECS/EFS documentation says to configure your task definition like this to mount an efs volume in an ecs container:</p>
  
  <pre><code>{
      "containerDefinitions": [
          {
              "memory": 128,
              "portMappings": [
                  {
                      "hostPort": 80,
                      "containerPort": 80,
                      "protocol": "tcp"
                  }
              ],
              "essential": true,
              "mountPoints": [
                  {
                      "containerPath": "/usr/share/nginx/html",
                      "sourceVolume": "efs-html"
                  }
              ],
              "name": "nginx",
              "image": "nginx"
          }
      ],
      "volumes": [
          {
              "name": "efs-html",
              "efsVolumeConfiguration": {
                  "fileSystemId": "fs-1234",
                  "rootDirectory": "/path/to/my/data"
              }
          }
      ],
      "family": "nginx-efs"
  }
  </code></pre>
  
  <p><a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_efs.html#efs-create" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_efs.html#efs-create</a></p>
  
  <p>How does that translate to docker-compose/ecs-params.yml syntax?</p>