0 votes
in AWS by
A Developer has been asked to create an AWS Elastic Beanstalk environment for a production web application that needs to handle thousands of requests.

Currently, the dev environment is running on a t1.micro instance. What is the best way for the developer to provision a new production environment with a m4.large instance instead of a t1.micro?

A. Use CloudFormation to migrate the Amazon EC2 instance type from t1.micro to m4.large.

B. Create a new configuration file with the instance type as m4.large and reference this file when provisioning the new environment.

C. Provision a m4.large instance directly in the dev environment and deploy to the new production environment.

D. Change the instance type value in the configurations file to m4.large by using the update autoscaling group CLI command.

1 Answer

0 votes
by

Answer - B.

The Elastic Beanstalk console and EB CLI set configuration options when you create an environment.

You can also set configuration options in saved configurations and configuration files.

If the same option is set in multiple locations, the value used is determined by order of precedence.

Configuration option settings can be composed in text format and saved before environment creation, applied during environment creation using any supported client, and added, modified, or removed after environment creation.

During environment creation, configuration options are applied from multiple sources with the following precedence, from highest to lowest:

Settings applied directly to the environment - Settings specified during a create environment or update environment operation on the Elastic Beanstalk API by any client, including the AWS Management Console, EB CLI, AWS CLI, and SDKs.

The AWS Management Console and EB CLI also apply recommended values for some options that apply at this level unless overridden.

Saved Configurations - Settings for any options that are not applied directly to the environment are loaded from a saved configuration, if specified.

Configuration Files (.ebextensions) - Settings for any options that are not applied directly to the environment and not specified in a saved configuration are loaded from configuration files in the .ebextensions folder at the root of the application source bundle.

Configuration files are executed in alphabetical order.

For example, .ebextensions/01run.config is executed before .ebextensions/02do.config.

Default Values - If a configuration option has a default value, it only applies when the option is not set at any of the above levels.

If the same configuration option is defined in more than one location, the setting with the highest precedence is applied.

When a setting is applied from a saved configuration or settings applied directly to the environment, the setting is stored as part of the environment's configuration.

These settings can be removed with the AWS CLI or with the EB CLI.

Related questions

0 votes
asked Apr 22 in AWS by DavidAnderson
0 votes
asked Apr 17 by DavidAnderson
...