Sets default values for Elastic Beanstalk applications created with EB CLI by prompting you with a series of questions.
The values you set with
init apply only to the current directory and
If you run
eb init without specifying any options, the EB CLI prompts you
to enter a value for each setting.
eb init to create a new key pair, you must have
ssh-keygen installed on your local machine and available from the command
Forces EB CLI to prompt you to provide a value for every
The name of the Amazon EC2 key pair to use with the Secure Shell (SSH) client to securely log in to the Amazon EC2 instances running your Elastic Beanstalk application.
List of child directories to initialize. Only for use with Compose Environments.
Specify the platform to skip
interactive configuration. The platform name can include a version if the platform
supports multiple configurations. If you do not specify a configuration version,
EB CLI uses the most recent configuration. Use
When you specify this option, then EB CLI does not prompt you for values for any other options. Instead, it assumes default values for each option. You can specify options for anything for which you do not want to use default values.
AWS CodeCommit repository and branch. See Using the EB CLI with AWS CodeCommit.
If you run
eb init in a folder that contains a buildspec.yml file, Elastic Beanstalk parses the
file for an
eb_codebuild_settings entry with the following format:
The name (not ARN) of the IAM role for AWS CodeBuild. This value is required and if omitted any subsequent
eb deploycommand fails.
The amount of resources for the Docker container. Valid values are BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, and BUILD_GENERAL1_LARGE.
The name of the Docker Hub or Amazon ECR image that AWS CodeBuild creates for Elastic Beanstalk. This value is optional and if omitted the
eb initcommand prompts you for a platform and other options. see Build Environment Reference for AWS CodeBuild for a list of images.
The duration, in minutes, that the AWS CodeBuild build runs before timing out. This value is optional. See Create a Build Project in AWS CodeBuild for the default value and range of values.
Learn more about AWS CodeBuild support in Elastic Beanstalk in the Workflow topic.
If successful, the command guides you through setting up a new Elastic Beanstalk application through a series of prompts.
The following example request initializes EB CLI and prompts you to enter information about your application. Replace the red placeholder text with your own values.
eb init -iSelect a default region 1) us-east-1 : US East (N. Virginia) 2) us-west-1 : US West (N. California) 3) us-west-2 : US West (Oregon) 4) eu-west-1 : EU (Ireland) 5) eu-central-1 : EU (Frankfurt) 6) ap-south-1 : Asia Pacific (Mumbai) 7) ap-southeast-1 : Asia Pacific (Singapore) 8) ap-southeast-2 : Asia Pacific (Sydney) 9) ap-northeast-1 : Asia Pacific (Tokyo) 10) ap-northeast-2 : Asia Pacific (Seoul) 11) sa-east-1 : South America (Sao Paulo) 12) cn-north-1 : China (Beijing) 13) us-east-2 : US East (Columbus) 14) ca-central-1 : Canada (Central) 15) eu-west-2 : EU (London) (default is 3):
3Select an application to use 1) HelloWorldApp 2) NewApp 3) [ Create new Application ] (default is 3):
3Enter Application Name (default is "tmp"): Application tmp has been created. It appears you are using PHP. Is this correct? (y/n):
ySelect a platform version. 1) PHP 5.5 2) PHP 5.4 3) PHP 5.3 (default is 1): 1 Do you want to set up SSH for your instances? (y/n):
ySelect a keypair. 1) aws-eb 2) [ Create new KeyPair ] (default is 2):