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,530 points
2,001 views

1 answer to this question.

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
• 4,170 points

Related Questions In AWS

0 votes
1 answer

How can I just increase the size of my root disk on AWS EC2 for use with Elastic Beanstalk?

This can be done using the following ...READ MORE

answered Nov 12, 2018 in AWS by Archana
• 5,640 points
2,921 views
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
3,511 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,640 points
1,969 views
0 votes
1 answer
0 votes
0 answers

How can I migrate Elastic beanstalk env from one region to another on AWS?

I need help! How can i migrate ...READ MORE

Sep 18, 2020 in AWS by anonymous
• 19,610 points
1,508 views
0 votes
1 answer

How to create a Lambda function with AWS CLI?

Hi@akhtar, To create a function, you need a ...READ MORE

answered Nov 5, 2020 in AWS by MD
• 95,440 points
985 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
• 4,170 points
4,175 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
• 4,170 points
19,037 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP