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.
.
Settings in configuration files are not applied directly to the environment and cannot be removed without modifying the configuration files and deploying a new application version. If a setting applied with one of the other methods is removed, the same setting will be loaded from configuration files in the source bundle.
Option A is incorrect since the Elastic Beanstalk service already manages the environment, and we don’t need Cloudformation for this.
Option C is incorrect since the changes need to be done for the current configuration.
For more information on making this change, please refer to the below Link-
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.ec2.html