Q25 — AWS DOP-C02 Ch.3
Question 25 of 100 | ← Chapter 3
A DevOps engineer seeks a solution to migrate an application to AWS. The application runs on Linux and requires specific versions of Apache Tomcat, HAProxy, and Varnish Cache to operate correctly. Operating system-level parameters must be tuned. The solution must include automated deployment of new application versions. Infrastructure must be scalable, and failed servers must be automatically replaced.
- A. Upload the application—including all required software—as a Docker image to Amazon ECR. Create an Amazon ECS cluster using the AWS Fargate launch type and Auto Scaling groups. Create an AWS CodePipeline with Amazon ECR as the source and Amazon ECS as the deployment provider.
- B. Upload application code to an AWS CodeCommit repository with saved configuration files to install and configure software. Create an AWS Elastic Beanstalk web server environment using the Tomcat solution stack with load balancing. Create an AWS CodePipeline with CodeCommit as the source and Elastic Beanstalk as the deployment provider.
- C. Upload application code to an AWS CodeCommit repository with .ebextensions files to configure and install software. Create an AWS Elastic Beanstalk worker environment using the Tomcat solution stack. Create an AWS CodePipeline with CodeCommit as the source and Elastic Beanstalk as the deployment provider.
- D. Upload application code to an AWS CodeCommit repository with an appspec.yml file to configure and install required software. Create an AWS CodeDeploy deployment group associated with an Amazon EC2 Auto Scaling group. Create an AWS CodePipeline using CodeCommit as the source and CodeDeploy as the deployment provider. ✓
Correct Answer: D. Upload application code to an AWS CodeCommit repository with an appspec.yml file to configure and install required software. Create an AWS CodeDeploy deployment group associated with an Amazon EC2 Auto Scaling group. Create an AWS CodePipeline using CodeCommit as the source and CodeDeploy as the deployment provider.
Explanation
The requirements demand OS-level customization (e.g., kernel tuning), multi-component middleware (Tomcat + HAProxy + Varnish), automated deployments, scalability, and self-healing. Option D fulfills all: CodeDeploy with appspec.yml enables granular OS configuration and software installation; EC2 Auto Scaling provides elasticity and automatic replacement of unhealthy instances. Option A (Fargate) lacks OS-level control. Options B and C constrain customization to Elastic Beanstalk’s predefined Tomcat stacks, preventing co-deployment of HAProxy and Varnish alongside Tomcat in a single, tunable environment.