ECS 'Unknown volume' error

Hello,

I am trying to get our app to deploy to ECS thru pipelines, but do not understand how to take care of the following error

 

+ python ecs_deploy.py task_definition.json $DOCKER_IMAGE:$TAG 1 0 200 Failed to update the stack. An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Unknown volume 'etc'.

 

Here is what I have in my container definition for mount points

 

"mountPoints": [{
  "containerPath": "/home/app/etc",
  "sourceVolume": "etc",
  "readOnly": false
}],

I am following this example

https://bitbucket.org/awslabs/amazon-ecs-bitbucket-pipelines-python/src/a7f2ec188250?at=master

How do I make it aware of the volume? 

 

1 answer

0 votes

looks like your task definition contains a mountPoint but no volumes (to be mounted); see the example at http://docs.aws.amazon.com/cli/latest/reference/ecs/register-task-definition.html

 

{
      "family": "web-timer",
      "containerDefinitions": [
      {
              "name": "web",
              "image": "nginx",
              "cpu": 99,
              "memory": 100,
              "portMappings": [{
                      "containerPort": 80,
                      "hostPort": 80
              }],
              "essential": true,
              "mountPoints": [{
                      "sourceVolume": "webdata",
                      "containerPath": "/usr/share/nginx/html",
                      "readOnly": true
              }]
      }, {
              "name": "timer",
              "image": "busybox",
              "cpu": 10,
              "memory": 20,
              "entryPoint": ["sh", "-c"],
              "command": ["while true; do date > /nginx/index.html; sleep 1; done"],
              "mountPoints": [{
                      "sourceVolume": "webdata",
                      "containerPath": "/nginx/"
              }]
      }],
      "volumes": [{
              "name": "webdata",
              "host": {
                      "sourcePath": "/ecs/webdata"
              }}
      ]
}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

228 views 3 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you