Search code examples
amazon-web-servicesamazon-elastic-beanstalkebcli

Commit .elasticbeanstalk/config.yml in Elastic Beanstalk


Is it a good approach to commit the .elasticbeanstalk/config.yml inside the git repo of a project which uses eb deploy?

We want to deploy using our CI and so we can not use the interactive eb init. What we are thinking now is to define our dev, uat and prod inside that config.yml (if possible) and to point to that environment using eb deploy.

We saw that we could perform eb init with all necessary parameters in ebcli version2 but not in version 3 anymore? So it seems the approach is changed?

Can someone explain how to deploy EB for multiple environments, without interaction?


Solution

  • The EB CLI is really meant to be used from a workstation. I think you'd be better off scripting your CI with the AWS CLI.

    A deployment with eb deploy will archive your code in S3 (or CodeCommit), create a new application version then update the environment with the new version label. All of those operations are supported with AWS CLI commands.

    Or, you could write your own deployment script in Python with boto3. That's an easy option too. That's basically what the EB CLI is.