Create Elastic Beanstalk Application in Specified Environment | AWS CLI Command

Create Elastic Beanstalk Application

Prev Question Next Question

Question

Which of the following commands for the elastic beanstalk CLI can be used to create the current application into the specified environment?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A.

Differences from Version 3 of EB CLI.

EB is a command line interface (CLI) tool for Elastic Beanstalk that you can use to deploy applications quickly and more easily.

The latest version of EB was introduced by Elastic Beanstalk in EB CLI 3

Although Elastic Beanstalk still supports EB 2.6 for customers who previously installed and continue to use it, you should migrate to the latest version of EB CLI 3, as it can manage environments that you launched using EB CLI 2.6 or earlier versions of EB CLI.

EB CLI automatically retrieves settings from an environment created using EB if the environment is running.

Note that EB CLI 3 does not store option settings locally, as in earlier versions.

EB CLI introduces the commands eb create, eb deploy, eb open, eb console, eb scale, eb setenv, eb config, eb terminate, eb clone, eb list, eb use, eb printenv, and eb ssh.

In EB CLI 3.1 or later, you can also use the eb swap command.

In EB CLI 3.2 only, you can use the eb abort, eb platform, and eb upgrade commands.

In addition to these new commands, EB CLI 3 commands differ from EB CLI 2.6 commands in several cases:

eb init - Use eb init to create an .elasticbeanstalk directory in an existing project directory and create a new Elastic Beanstalk application for the project.

Unlike with previous versions, EB CLI 3 and later versions do not prompt you to create an environment.

eb start - EB CLI 3 does not include the command eb start.

Use eb create to create an environment.

eb stop - EB CLI 3 does not include the command eb stop.

Use eb terminate to completely terminate an environment and clean up.

eb push and git aws.push - EB CLI 3 does not include the commands eb push or git aws.push.

Use eb deploy to update your application code.

eb update - EB CLI 3 does not include the command eb update.

Use eb config to update an environment.

eb branch - EB CLI 3 does not include the command eb branch.

For more information about using EB CLI 3 commands to create and manage an application, see EB CLI Command Reference.

For a command reference for EB 2.6, see EB CLI 2 Commands.

For a walkthrough of how to deploy a sample application using EB CLI 3, see Managing Elastic Beanstalk Environments with the EB CLI.

For a walkthrough of how to deploy a sample application using eb 2.6, see Getting Started with Eb.

For a walkthrough of how to use EB 2.6 to map a Git branch to a specific environment, see Deploying a Git Branch to a Specific Environment.

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli.html#eb-cli2-differences

Note: Additionally, EB CLI 2.6 has been deprecated.

It has been replaced by AWS CLI.

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html

We will replace this question soon.

The correct answer is A. eb create.

The Elastic Beanstalk CLI is a command-line interface for deploying and managing applications on Elastic Beanstalk. The eb create command is used to create a new environment for an application.

When you run eb create, Elastic Beanstalk creates a new environment for your application with a unique URL and deploys your code to it. You can specify the name of the environment you want to create, or Elastic Beanstalk will generate a name for you.

Here's an example of how to use the eb create command:

lua
eb create my-environment

In this example, my-environment is the name of the environment you want to create.

Answer B, eb start, is not a valid Elastic Beanstalk CLI command.

Answer C, en env, is not a valid Elastic Beanstalk CLI command. The correct command is eb env.

Answer D, en app, is not a valid Elastic Beanstalk CLI command. The correct command is eb app.