Mateus Luiz
Mateus Luiz

Reputation: 796

How to update elastic beanstalk code with the AWS CLI?

I'm trying to do the deploy in the Gitlab CI, I already tried to use the EB CLI, but with no success. But I've found that the AWS CLI has elastic beanstalk support too and then I tried this:

aws elasticbeanstalk update-environment --application-name APPNAME --environment-name ENVNAME --environment-id APPID

But this doesn't update the code like the eb deploy command do. Any suggestions?

Upvotes: 2

Views: 1444

Answers (1)

progfan
progfan

Reputation: 2526

eb deploy is essentially a three-step process:

  1. Zip up your application code and upload it to S3
  2. Note down the S3 Bucket and key name to pass to CreateApplicationVersion.
  3. After creating an application version, note down the VersionLabel, and pass it to the above update-environment call.

Upvotes: 4

Related Questions