Search code examples
amazon-ecsamazon-efs

ECS CLI efsVolumeConfiguration Docker Compose / ECS Params yml


I have a service on ECS deployed through ecs-cli compose service up

The ECS/EFS documentation says to configure your task definition like this to mount an efs volume in an ecs container:

{
    "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"
}

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_efs.html#efs-create

How does that translate to docker-compose/ecs-params.yml syntax?


Solution

  • Was resolved in 1019.

    Documentation can be found here.

    efs_volumes params