# Elastic Beanstalk deployment from multiple branches

**URL:** <https://discuss.circleci.com/t/elastic-beanstalk-deployment-from-multiple-branches/3744>\
**Category:** Deployments\
**Tags:** elasticbeanstalk, aws, nodejs, docker, circle-yml\
**Created:** [May 2, 2016, 4:44pm UTC](https://discuss.circleci.com/t/elastic-beanstalk-deployment-from-multiple-branches/3744 "2016-05-02T16:44:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipchmalts](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@philipchmalts](https://discuss.circleci.com/u/philipchmalts)\
**Post date:** [May 2, 2016, 4:44pm UTC](https://discuss.circleci.com/t/elastic-beanstalk-deployment-from-multiple-branches/3744/1 "2016-05-02T16:44:52Z")

</div>

Hey Everyone,

Im having a hard time figuring out how to deploy multiple branches to different environments on elastic beanstalk using docker + circle CI. For example, I would simply like to deploy master to production environment and development to a staging one. If I have 2 elastic beanstalks listed in my circle.yml file it only picks up the development one and not master. Am I missing something. Doing it the normal way without eb works but I need to deploy to eb. Here is my circle.yml file.

```auto

machine:
  services:
    - docker
dependencies:
  override:
    - docker info
    - docker build -t ch *****/***** :$CIRCLE_SHA1 .
test:
  override:
    - docker run -t -p 8080:8080 -e CONTINUOUS_INTEGRATION=true chmaltsp/if-planning:$CIRCLE_SHA1 npm test

## Customize deployment commands
deployment:
  elasticbeanstalk:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - aws configure set default.region us-west-2
      - ./deploy.sh $CIRCLE_SHA1
  elasticbeanstalk:
    branch: development
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - aws configure set default.region us-west-2
      - ./deploydev.sh $CIRCLE_SHA1

```

Any help would be much appreciated.

---

<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/elastic-beanstalk-deployment-from-multiple-branches/3744/2 "2018-06-18T11:41:01Z")

</div>

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


