How to use AWS CLI with Elastic Beanstalk?

0 votes

In the documentation, it states that the EB CLI is replaced by AWS CLI but all of the documentation is still talking about EB CLI.

I have created an application in the Elastic Beanstalk console and now I'm ready to start developing. I have all the tools installed on Ubuntu and I've already tested it locally. Now I want to deploy it to Elastic Beanstalk. How do I do this with AWS CLI?

Sep 28, 2018 in AWS by datageek
• 2,390 points
69 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You have to create a source bundle from your application, see details here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html (Then you can use the AWS CLI to create a new version from your application and deploy it to one application environment. (See the CLI documentation for EBS here.)

Create a source bundle:

zip MyCodeBundle.zip <source files>

Upload that to S3:

aws s3 cp MyCodeBundle.zip s3://a-bucket-where-you-store-your-source-bundles/
Create a new application version using the source bundle you just uploaded:
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 update one of your environments to use that version 

aws elasticbeanstalk update-environment --application-name YourEBSAppName --environment-name

answered Sep 28, 2018 by Archana
• 3,770 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

AWS Elastic Beanstalk - How to increase instance disk capacity?

The 8 GB diskthat you are seeing ...READ MORE

answered Sep 3, 2018 in AWS by anonymous
63 views
+1 vote
1 answer

How to make an application private on AWS Elastic Beanstalk?

Like you said by default, your application ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,280 points
21 views
0 votes
1 answer
+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 56,100 points
675 views
0 votes
1 answer

How to copy a folder from S3 to Elastic Beanstalk instance on its creation?

I had encountered similar problem. But i ...READ MORE

answered Aug 24, 2018 in AWS by Archana
• 3,770 points
304 views
0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 3,770 points
1,497 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.