title: AWS ECS Task Definition: Unknown parameter in volumes[0]: "dockerVolumeConfiguration", must be one of: name, host
body: <p>I am trying to run Wazuh/Wazuh docker container on ECS. I was able to register task definition and launch container using Terraform. However, I am facing an issue with "Volume"(Data Volume) while registering tak definition using AWS CLI command.</p>
  
  <p>Command: aws ecs --region eu-west-1  register-task-definition --family hids --cli-input-json file://task-definition.json</p>
  
  <p>Error:
  ParamValidationError: Parameter validation failed:
  Unknown parameter in volumes[0]: "dockerVolumeConfiguration", must be one of: name, host
  2019-08-29 07:31:59,195 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255</p>
  
  <pre><code>{
  "containerDefinitions": [
    {
      "portMappings": [
        {
          "hostPort": 514,
          "containerPort": 514,
          "protocol": "udp"
  
        },
       {
          "hostPort": 1514,
          "containerPort": 1514,
          "protocol": "udp"
  
        },
        {
          "hostPort": 1515,
          "containerPort": 1515,
          "protocol": "tcp"
  
        },
        {
          "hostPort": 1516,
          "containerPort": 1516,
          "protocol": "tcp"
  
        },
        {
          "hostPort": 55000,
          "containerPort": 55000,
          "protocol": "tcp"
  
        }
      ],
      "image": "wazuh/wazuh",
      "essential": true,
      "name": "chids",
      "cpu": 1600,
      "memory": 1600,
      "mountPoints": [
          {
            "containerPath": "/var/ossec/data",
            "sourceVolume": "ossec-data"
  
          },
          {
            "containerPath": "/etc/filebeat",
            "sourceVolume": "filebeat_etc"
  
          },
          {
            "containerPath": "/var/lib/filebeat",
            "sourceVolume": "filebeat_lib"
  
          },
          {
            "containerPath": "/etc/postfix",
            "sourceVolume": "postfix"
          }
        ]
  
    }
  ],
  "volumes": [
    {
        "name": "ossec-data",
        "dockerVolumeConfiguration": {
        "scope": "shared",
        "driver": "local",
        "autoprovision": true
      }
    },
    {
      "name": "filebeat_etc",
      "dockerVolumeConfiguration": {
      "scope": "shared",
      "driver": "local",
      "autoprovision": true
      }
    },
    {
      "name": "filebeat_lib",
      "dockerVolumeConfiguration": {
      "scope": "shared",
      "driver": "local",
      "autoprovision": true
      }
    },
    {
      "name": "postfix",
      "dockerVolumeConfiguration": {
      "scope": "shared",
      "driver": "local",
      "autoprovision": true
    }
  }
  ]   
  }
  </code></pre>
  
  <p>I tried by adding "host" parameter(however it supports Bind Mounts only). But got the same error.</p>
  
  <pre><code>    "volumes": [
    {
        "name": "ossec-data",
        "host": {
        "sourcePath": "/var/ossec/data"
      },
        "dockerVolumeConfiguration": {
        "scope": "shared",
        "driver": "local",
        "autoprovision": true
      }
    }
  ]
  </code></pre>
  
  <p>ECS should register the task definition having 4 Data Volumes and associated mount points.</p>