AWS Elastic Beanstalk

30 soru

Soru 21Soru

A developer is packaging a Node.js web application for deployment to AWS Elastic Beanstalk. The application requires the installation of an external system tool (git) and must define a custom environment variable named APP_STAGE set to production. The developer wants to manage these configurations as code within the application source bundle. Which two actions must the developer take to accomplish this? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create a directory named .ebextensions at the root of the application source bundle.; Create a configuration file ending with the .config extension inside the .ebextensions directory.

Cevap

Create a directory named .ebextensions at the root of the application source bundle, and create a configuration file ending with the .config extension inside that directory.
To customize the AWS Elastic Beanstalk environment (such as installing packages or setting environment variables) using the application source bundle, the configuration files must be stored in a directory named '.ebextensions' located at the root of the application source bundle. These files must have a '.config' extension and contain valid YAML or JSON syntax.

Adım Adım Çözüm

1
Determine the directory structure required for Elastic Beanstalk configuration files.
Identify that a directory named .ebextensions must be created at the root of the application source bundle.
Elastic Beanstalk looks for configuration files specifically in this location at the root level during deployment.
2
Determine the file naming convention and format for these configurations.
Identify that files must use a .config extension (e.g., setup.config) and contain YAML or JSON formatted configuration blocks such as packages and option_settings.
This is the required format and suffix for Elastic Beanstalk to recognize and parse configurations.

Anahtar Kavram

Configuring AWS Elastic Beanstalk environments using .ebextensions configuration files
Soru 22Soru

A developer is updating a critical, high-traffic API application deployed on AWS Elastic Beanstalk. The application must maintain full serving capacity during the deployment process. If any instance running the new version fails, the system must trigger an automatic rollback to the previous version with the absolute minimum time to restore the original state. The developer wants to avoid the overhead of managing a separate environment for Blue/Green deployments. Which deployment policy best satisfies these requirements?

Cevabı ve açıklamayı göster

Cevap: Immutable

Cevap

The Immutable deployment policy satisfies these requirements by maintaining full capacity and allowing rapid, clean rollbacks.
The Immutable deployment policy creates a temporary Auto Scaling group and launches a new set of instances running the updated version alongside the original instances. This ensures 100% of the active serving capacity is maintained. If the new instances fail health checks, AWS Elastic Beanstalk immediately terminates the temporary Auto Scaling group. This results in an extremely fast rollback with zero impact on the original instances and requires no manual intervention or secondary environment management.

Adım Adım Çözüm

1
Analyze the capacity requirement during deployment.
The application must maintain 100% serving capacity, which rules out 'Rolling' (which reduces capacity during deployment) and 'All at once' (which takes all instances out of service).
Eliminating deployment policies that reduce or eliminate service capacity.
2
Evaluate the rollback speed and complexity requirement.
The rollback must be automatic and extremely fast. 'Rolling with additional batch' requires updating instances in batches back to the original version, which takes time. 'Immutable' deployments can be rolled back immediately by terminating the temporary Auto Scaling group.
Determining the policy that provides the fastest recovery from a deployment failure.
3
Check the infrastructure overhead constraint.
The developer wants to avoid managing a separate environment, which is required for Blue/Green deployments but not for Immutable deployments.
Selecting the policy that performs the update within the existing environment without external management overhead.

Anahtar Kavram

AWS Elastic Beanstalk Immutable Deployment Policy
Tahmini Süre:1m 30s
Soru 23Soru

A developer is deploying an update to a Python application hosted on AWS Elastic Beanstalk using the Amazon Linux 2023 platform. The deployment requires running a database migration script that is packaged inside the application source code. This script must run after the application source archive is extracted to the staging directory, but before the application version is deployed and the web server is restarted. Which approach should the developer use to run the script at the correct stage?

Cevabı ve açıklamayı göster

Cevap: Place the migration script in the .platform/hooks/predeploy/ directory of the application source bundle.

Cevap

Place the migration script in the .platform/hooks/predeploy/ directory of the application source bundle.
The correct answer is to place the script in the .platform/hooks/predeploy/ directory. In modern Elastic Beanstalk platforms (Amazon Linux 2 and Amazon Linux 2023), developers can run custom scripts at specific lifecycle events using platform hooks. Scripts placed in the .platform/hooks/predeploy/ folder are executed after the application archive is extracted to the staging folder but before the application version is deployed and the web server is restarted. This is the correct phase for running database migrations or setting up environment-specific configuration files.

Adım Adım Çözüm

1
Identify the target platform environment and configuration requirements.
The application runs on Amazon Linux 2023, which supports platform hooks and .ebextensions.
Platform hooks provide a structured way to run scripts at specific lifecycle events on modern Elastic Beanstalk platforms.
2
Evaluate the execution timing of different hooks.
The predeploy platform hook runs after the application source archive is extracted but before the application is deployed.
This matches the requirement to run the migration script on the extracted source files before the new version becomes active.
3
Package the script in the correct directory.
Creating the directory .platform/hooks/predeploy/ and putting the executable script in it ensures execution at the correct stage.
Elastic Beanstalk automatically executes any scripts located in this specific platform directory during deployment.

Anahtar Kavram

AWS Elastic Beanstalk Platform Hooks
Tahmini Süre:1m 30s
Soru 24Soru

A developer is preparing a Java application package for deployment to an AWS Elastic Beanstalk environment. The application requires a custom system-level utility, `htop`, to be installed on the underlying Amazon EC2 instances. Additionally, the application requires an environment variable named `DB_HOST` to be accessible at runtime. Which two actions should the developer take to satisfy these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create a configuration file ending with `.config` inside a directory named `.ebextensions` at the root of the application source bundle, and use the `packages` section to define the `htop` installation.; Configure the `DB_HOST` environment variable in the Environment Properties section of the Elastic Beanstalk environment configuration.

Cevap

Create a configuration file ending with `.config` in a folder named `.ebextensions` at the root of the application source bundle to install the package, and configure the environment variable in the Environment Properties section under the Elastic Beanstalk environment configuration.
The correct solution involves leveraging `.ebextensions` at the root of the source bundle to configure package dependencies and using the Environment Properties configuration setting to handle variable values, satisfying both host-level and application-level requirements.

Adım Adım Çözüm

1
Determine how to run custom package installations on the host instance during Elastic Beanstalk deployment.
Identify that the `.ebextensions` directory must be located at the root of the source bundle and contain a `.config` file with a `packages` block.
This directory is read by the Elastic Beanstalk platform agent to apply customizations before the application starts.
2
Determine how to provide configuration settings to the application environment at runtime.
Identify that Elastic Beanstalk supports Environment Properties for injecting variables into the execution context.
Setting these properties ensures they are parsed by the OS and available to the Java application code via system environment checks.

Anahtar Kavram

AWS Elastic Beanstalk instance customization via `.ebextensions` configuration files and runtime environment variable configuration.
Soru 25Soru

A developer is packaging a web application for deployment to AWS Elastic Beanstalk. To configure custom environment properties and OS-level packages, the developer creates a configuration file named 01_setup.config. However, after deploying the application source bundle zip file, the developer notices that none of the custom configurations are applied to the EC2 instances. Where must the configuration file be located within the application source bundle for AWS Elastic Beanstalk to detect and process it?

Cevabı ve açıklamayı göster

Cevap: Inside a folder named .ebextensions placed at the root of the application source bundle

Cevap

Inside a folder named .ebextensions placed at the root of the application source bundle
AWS Elastic Beanstalk requires configuration files to be stored in a directory named '.ebextensions' at the root of the application source bundle. Files within this directory must have a '.config' extension to be parsed and executed during deployment.

Adım Adım Çözüm

1
Identify the mechanism AWS Elastic Beanstalk uses for customization during deployment.
Elastic Beanstalk uses configuration files (ending in .config) to customize environment resources and software.
Understanding the built-in configuration mechanism of Elastic Beanstalk helps locate where configuration files must be stored.
2
Determine the required directory name and location requirements for these configuration files.
The files must be located in a folder named '.ebextensions' (with a leading dot) situated precisely at the root of the application source bundle.
Elastic Beanstalk's deployment agent scans only the root-level '.ebextensions' folder for files ending in '.config'.

Anahtar Kavram

AWS Elastic Beanstalk configuration files (.ebextensions) structure
Tahmini Süre:1m 30s
Soru 26Soru

A developer is preparing to deploy a Node.js web application to an AWS Elastic Beanstalk environment. The deployment has two new requirements: it must securely retrieve a database password that is configured to rotate automatically, and it must install a custom security daemon package on the underlying Amazon EC2 instances during environment provisioning.

Which two actions should the developer take to meet these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Store the database password in AWS Secrets Manager, and retrieve the secret programmatically in the application code.; Create a configuration file containing the package installation instructions and place it inside a directory named `.ebextensions` at the root of the application source bundle.

Cevap

Store the database password in AWS Secrets Manager to be retrieved programmatically by the application, and place the configuration file inside the `.ebextensions` directory at the root of the application source bundle.
To securely manage a database password that needs automatic rotation, AWS Secrets Manager is the correct choice because it natively integrates with rotation schedules. To customize the EC2 instances (such as installing packages), configuration files must be stored in the `.ebextensions` folder located at the root of the application source bundle. Therefore, storing the password in Secrets Manager and placing the configuration file in `.ebextensions` at the root are the correct actions.

Adım Adım Çözüm

1
Evaluate secret storage and rotation requirements.
Identify AWS Secrets Manager as the appropriate service because it natively supports automatic rotation, unlike Systems Manager Parameter Store.
Secrets Manager provides out-of-the-box secret rotation using AWS Lambda.
2
Evaluate how to customize EC2 instances with packages during deployment.
Determine that an Elastic Beanstalk configuration file (.config) must be placed in a directory named `.ebextensions`.
Elastic Beanstalk searches for configuration files specifically in this folder to apply customizations.
3
Verify directory location and naming constraints.
Confirm that the `.ebextensions` directory must be at the root level of the application source bundle with a leading period.
Incorrect naming (like `ebextensions`) or incorrect placement (like inside a `/src` directory) will cause Elastic Beanstalk to ignore the configurations.

Anahtar Kavram

AWS Elastic Beanstalk environment customization using `.ebextensions` and secure secret management with Secrets Manager vs Parameter Store.
Tahmini Süre:1m 30s
Soru 27Soru

An e-commerce company runs a production web application on AWS Elastic Beanstalk. The application is deployed across 1010 Amazon EC2 instances inside an Auto Scaling group behind an Application Load Balancer. A developer needs to configure a deployment strategy for a minor application update. The deployment must satisfy the following constraints:

* The environment must maintain exactly 100%100\% of its capacity (1010 instances) to handle traffic at all times during the update.
* The temporary cost overhead during the deployment process must be kept to a minimum.
* The update must be performed within the existing environment without creating a new environment or swapping CNAMEs.

Which Elastic Beanstalk deployment policy should the developer select?

Cevabı ve açıklamayı göster

Cevap: Rolling with additional batch

Cevap

Rolling with additional batch
The deployment policy that meets all criteria is the one that adds an additional batch of instances before taking any offline, thereby maintaining the full environment capacity of ten instances during deployment. Since only one batch is provisioned at a time, the temporary cost overhead is minimized. Furthermore, the deployment is executed entirely within the existing environment.

Adım Adım Çözüm

1
Evaluate the capacity constraint.
Since the application must maintain 100%100\% capacity (1010 instances) during the update, the policies 'All at once' and 'Rolling' are ruled out because they take instances out of service.
Eliminating options that reduce capacity helps narrow down choices to policies that add temporary instances.
2
Evaluate the cost overhead constraint.
Between 'Immutable' and 'Rolling with additional batch', the 'Rolling with additional batch' policy is more cost-efficient because it only launches a small, configurable batch of extra instances (e.g., 11 or 22), whereas 'Immutable' launches a duplicate set of 1010 instances (doubling the cost).
Comparing temporary cost resource provisioning determines the most cost-effective solution.
3
Evaluate the environment constraint.
The 'Rolling with additional batch' policy performs the update in-place within the existing Auto Scaling group and environment, avoiding CNAME swapping.
Ensures alignment with all environmental limits.

Anahtar Kavram

AWS Elastic Beanstalk deployment policies and their tradeoffs regarding capacity, deployment speed, rollback, and cost.
Tahmini Süre:1m 30s
Soru 28Soru

A developer needs to update a production web application hosted on AWS Elastic Beanstalk. The application runs on multiple Amazon EC2 instances behind an Application Load Balancer. The deployment must satisfy the following criteria:
- There must be zero application downtime.
- The environment must maintain 100%100\% of its provisioned capacity throughout the deployment process to handle high traffic.
- The deployment must support a fast and clean rollback mechanism with minimal impact if any issues occur.
- Double-allocation cost is acceptable for the duration of the deployment.

Which two Elastic Beanstalk deployment policies should the developer select to meet these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Immutable; Rolling with additional batch

Cevap

Immutable and Rolling with additional batch
The Immutable deployment policy satisfies the constraints by deploying the new version to a temporary Auto Scaling group, ensuring full capacity is maintained during health checks and allowing an instant rollback if needed. The Rolling with additional batch policy also meets the criteria by launching a new batch of instances first to maintain 100%100\% capacity before updating the existing instances in batches.

Adım Adım Çözüm

1
Analyze the capacity requirement
The requirement specifies that 100%100\% of the provisioned capacity must be maintained throughout the deployment. This rules out the standard Rolling policy, which takes instances out of service, and the All at once policy, which takes all instances out of service.
Maintaining full capacity is a strict constraint to handle high traffic without performance degradation.
2
Analyze the downtime and rollback requirements
The Immutable deployment policy launches a separate, temporary Auto Scaling group, meaning the existing environment runs at full capacity until the new version passes health checks. Rollback is immediate (terminating the new Auto Scaling group). The Rolling with additional batch policy launches a new batch first to maintain capacity before rolling the update through the existing instances, ensuring zero downtime.
Both policies satisfy the capacity and zero-downtime requirements by allocating additional temporary resources during the update.
3
Evaluate the non-native option
Linear 10% every 10 minutes is a CodeDeploy-specific configuration and cannot be selected as an Elastic Beanstalk deployment policy.
Only native Elastic Beanstalk deployment policies can be configured within the Elastic Beanstalk console or CLI.

Anahtar Kavram

AWS Elastic Beanstalk deployment policies and their impact on environment capacity, downtime, and rollbacks.
Soru 29Soru

A developer is deploying a Go application to AWS Elastic Beanstalk running on Amazon Linux 2023. The deployment must satisfy two requirements: set custom environment properties that the application reads at runtime, and run a bash script to install a monitoring agent after the application files are extracted but before the application process is started. Which two steps should the developer take to configure the application source bundle? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create a configuration file with a .config extension inside a directory named .ebextensions at the root of the source bundle, defining the properties under the aws:elasticbeanstalk:application:environment namespace.; Place the bash script in the .platform/hooks/predeploy directory at the root of the source bundle and ensure the script has execute permissions.

Cevap

To deploy the Go application with the given requirements, the developer must create a configuration file inside the .ebextensions directory at the root of the application source bundle to set the environment properties under the application environment namespace, and place the startup script inside the .platform/hooks/predeploy directory at the root of the source bundle.
To configure environment properties via configuration files, the properties must be defined in a .config file inside the .ebextensions directory at the root of the source bundle under the aws:elasticbeanstalk:application:environment namespace. To run scripts during deployment on Amazon Linux 2023, you must use platform hooks placed in the .platform/hooks/predeploy directory to execute after staging but before the application starts.

Adım Adım Çözüm

1
Configure environment properties in the source bundle.
Create a directory named .ebextensions at the root of the project, add a file ending in .config, and define option_settings under the aws:elasticbeanstalk:application:environment namespace.
This is the default mechanism for declaring custom application properties/environment variables within the Elastic Beanstalk source bundle.
2
Configure the deployment script execution stage.
Create the path .platform/hooks/predeploy at the root of the project, place the script inside it, and make it executable.
On Amazon Linux 2023 platforms, platform hooks located in .platform/hooks/predeploy automatically execute after staging the application but before launching the web server/process.

Anahtar Kavram

Elastic Beanstalk environment configuration via .ebextensions and custom scripts using .platform hooks
Tahmini Süre:2m 0s
Soru 30Soru

A developer needs to deploy a new version of a Java application to an AWS Elastic Beanstalk environment. The deployment must install a security patch on the host operating system using an environment configuration file named `security.config`. The application requires zero downtime during deployment, and the developer must ensure that if the deployment fails, the running production instances remain completely unaffected and do not require a manual recovery process. Which configuration and deployment setup meets these requirements?

Cevabı ve açıklamayı göster

Cevap: Use the Immutable deployment policy, and place `security.config` in the `.ebextensions/` directory at the root of the application source bundle.

Cevap

Use the Immutable deployment policy, and place the configuration file in the `.ebextensions/` directory at the root of the application source bundle.
The correct answer proposes using the Immutable deployment policy and placing the configuration file in the `.ebextensions/` directory. The Immutable deployment policy performs an update by launching a second Auto Scaling group with instances running the new version. If these new instances fail health checks, Elastic Beanstalk terminates them, leaving the original environment and instances completely untouched. This satisfies the requirement that production instances remain unaffected in case of failure. Placing the configuration file in the `.ebextensions/` directory at the root of the source bundle ensures that Elastic Beanstalk successfully parses and applies the custom configuration.

Adım Adım Çözüm

1
Analyze the deployment downtime and rollback requirements from the scenario.
The application requires zero downtime and must guarantee that a failed deployment leaves running production instances completely unaffected.
These constraints eliminate the All at once policy (which causes downtime) and the Rolling policy (which modifies existing instances, risking inconsistent states if a failure occurs).
2
Select the deployment policy that isolates changes and guarantees safe rollback.
The Immutable deployment policy is selected because it deploys the new version to a temporary Auto Scaling group, ensuring the existing instances are untouched until the new version is healthy.
Immutable updates provide zero downtime and the cleanest rollback path by terminating the temporary instances upon failure.
3
Determine the correct directory structure for Elastic Beanstalk configuration files.
The configuration file must be placed in a directory named `.ebextensions/` at the root of the source bundle.
Elastic Beanstalk requires the leading dot in `.ebextensions/` to recognize and apply the configuration files during provisioning; a folder named `ebextensions/` without the dot is ignored.

Anahtar Kavram

AWS Elastic Beanstalk Immutable deployments and `.ebextensions` configuration directory naming.
ÖncekiSayfa 2 / 2
AWS Elastic Beanstalk Alıştırma Soruları — AWS Certified Developer - Associate — Sayfa 2 | Examkin