The documentation states that the EB CLI is being replaced by AWS CLI, but all documents still speak of the EB CLI.
I created the application in the Elastic Beanstalk console and am now ready to start development. I have all the tools installed on Ubuntu, and I have already tested them locally. Now I want to deploy it to Elastic Beanstalk. How to do it using AWS CLI?
You need to create the source package from your application, see the details here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html (Or, alternatively, you can use AWS CodeCommit or AWS CodeBuild as the source for your application.)
You can then use the AWS CLI to create a new version of the application and deploy it in the same application environment. (See CLI Documentation for EBS here .)
Create the source package:
zip MyCodeBundle.zip <source files>
Download this on S3:
aws s3 cp MyCodeBundle.zip s3://a-bucket-where-you-store-your-source-bundles/
Create a new version of the application using the source you just downloaded:
aws elasticbeanstalk create-application-version --application-name YourEBSAppName --version-label YourVersionLabel --source-bundle S3Bucket="a-bucket-where-you-store-your-source-bundles",S3Key="MyCodeBundle.zip"
And finally, you will update one of your environments to use this version (this deployment, although this verb is completely absent in the new AWS CLI for EBS - it was a little confusing for me):
aws elasticbeanstalk update-environment --application-name YourEBSAppName --environment-name YourEBSEnvironmentName --version-label YourVersionLabel