Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TrevorJTClarke/b42b1c41c78bacc1b349836995aaf507 to your computer and use it in GitHub Desktop.
Save TrevorJTClarke/b42b1c41c78bacc1b349836995aaf507 to your computer and use it in GitHub Desktop.
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

Configure the deploy of AWS Elastic Beanstalk through CircleCI.

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.

Confirm Build Environment:

  • Ubuntu 14.04 (Trusty)

Configure circle.yml

Add the awsebcli dependency:

dependencies:
  pre:
    - pip install awsebcli

Add the deployment config:

deployment:
  production:
    branch: master
    commands:
      - eb deploy --profile default
  • If your deploy user don't have the elasticbeanstalk:DescribeEvents permission, the eb deploy will run for ever. CircleCI will cancel it after 10 minutes and break the build with timeout.

Create the EB Cli config file

./elasticbeanstalk/config.yml

branch-defaults:
  master:
    environment: you-environment-name
global:
  application_name: your-application-name
  default_ec2_keyname: ec2-key-pair-name
  default_platform: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.2 (Puma)
  default_region: sa-east-1
  profile: eb-cli
  sc: git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment