Error while deploying web app to AWS ElasticBeanStalk

I am getting the below error while deploying to aws elastic beanstalk from travis CI.

Service:AmazonECS, Code:ClientException, Message:Container list cannot be empty., Class:com.amazonaws.services.ecs.model.ClientException


.travis.yml:

sudo: required
language: generic

services:
  - docker

before_install:
  - docker build -t sathishpskdocker/react-test -f ./client/Dockerfile.dev ./client

script:
  - docker run -e CI=true sathishpskdocker/react-test npm test

after_success:
  - docker build -t sathishpskdocker/multi-client ./client
  - docker build -t sathishpskdocker/multi-nginx ./nginx
  - docker build -t sathishpskdocker/multi-server ./server
  - docker build -t sathishpskdocker/multi-worker ./worker
  # Log in to the docker CLI
  - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
  # Take those images and push them to docker hub
  - docker push sathishpskdocker/multi-client
  - docker push sathishpskdocker/multi-nginx
  - docker push sathishpskdocker/multi-server
  - docker push sathishpskdocker/multi-worker

deploy:
  provider: elasticbeanstalk
  region: 'us-west-2'
  app: 'multi-docker'
  env: 'Multidocker-env'
  bucker_name: elasticbeanstalk-us-west-2-194531873493
  bucker_path: docker-multi
  On:
    branch: master
  access_key_id: $AWS_ACCESS_KEY
  secret_access_key: $AWS_SECRET_KEY

Dockerrun.aws.json:

{
    "AWSEBDockerrunVersion": 2,
    "containerDefintions": [
        {
            "name": "client", 
            "image": "sathishpskdocker/multi-client",
            "hostname": "client",
            "essential": false,
            "memory": 128
        },
        {
            "name": "server",
            "image": "sathishpskdocker/multi-server",
            "hostname": "api",
            "essential": false,
            "memory": 128
        },
        {
            "name": "worker",
            "image": "sathishpskdocker/multi-worker",
            "hostname": "worker",
            "essential": false,
            "memory": 128
        },
        {
            "name": "nginx",
            "image": "sathishpskdocker/multi-nginx",
            "hostname": "nginx",
            "essential": true,
            "portMappings": [
                {
                    "hostPort": 80,
                    "containerPort": 80
                }
            ],
            "links": ["client", "server"],
            "memory": 128
        }
    ]
}

Deploying part alone failing with the error:
Service:AmazonECS, Code:ClientException, Message:Container list cannot be empty., Class:com.amazonaws.services.ecs.model.ClientException

Source: Docker Questions

LEAVE A COMMENT