# Multiple deployment routes fail with error

**URL:** <https://discuss.circleci.com/t/multiple-deployment-routes-fail-with-error/6047>\
**Category:** Deployments\
**Tags:** codedeploy, nodejs, circle-yml\
**Created:** [September 4, 2016, 7:54pm UTC](https://discuss.circleci.com/t/multiple-deployment-routes-fail-with-error/6047 "2016-09-04T19:54:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaiser](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kaiser/32/13444_2.png) [@kaiser](https://discuss.circleci.com/u/kaiser)\
**Post date:** [September 4, 2016, 7:54pm UTC](https://discuss.circleci.com/t/multiple-deployment-routes-fail-with-error/6047/1 "2016-09-04T19:54:39Z")

</div>

I have exactly two deployment routes (GitHub Pages and AWS CodeDeploy) in my `circle.yml` file and I am getting the following error since I added AWS CodeDeploy:

> deployment.production should be a either a deploy section with commands, a Heroku deploy section or a CodeDeploy deploy section

The `circle.yml` looks like this:

machine:  
node:  
version: 5.9.1

```
checkout:
  post:
    - git config user.email "test@example.com"
    - git config user.name "Circle CI AutoDeploy"

dependencies:
  pre:
    - bundle install

general:
  build_dir: build
  artifacts:
    - "log"
  branches:
    ignore:
      - /issue.*/

deployment:
  staging:
    branch: dev
    owner: franz-josef-kaiser
    commands:
      - ./scripts/deploy.sh
  production:
    branch: master
    owner: franz-josef-kaiser
    codedeploy:
      myapp:
        application_route: /build
        revision_location:
          revision_type: S3
          s3_location:
            bucket: my-bucket
            key_pattern: app/myapp-{SHORT_COMMIT}-{BUILD_NUM}
        region: eu-central-1
        deployment_group: my-production-instances
        deployment_config: CodeDeployDefault.AllAtOnce

test:
  override:
    - echo "Circle CI is only used for deployment at the moment"

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/multiple-deployment-routes-fail-with-error/6047/2 "2018-06-18T11:41:06Z")

</div>

Closed on June 18, 2018, 11:41am UTC


