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.

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.