nerdexam
Amazon

DOP-C02 · Question #166

A DevOps engineer wants to find a solution to migrate an application from on premises to AWS. The application is running on Linux and needs to run on specific versions of Apache Tomcat, HAProxy, and V

The correct answer is D. Upload the application code to an AWS CodeCommit repository with an appspec.yml file to. Explanation Option D is correct because using AWS CodeCommit with an appspec.yml file enables AWS CodeDeploy, which automates application deployments, supports OS-level configuration tuning on EC2 instances, allows specific software versions (Tomcat, HAProxy, Varnish) to be pre-i

Submitted by miguelv· Mar 6, 2026Configuration Management and Infrastructure as Code

Question

A DevOps engineer wants to find a solution to migrate an application from on premises to AWS. The application is running on Linux and needs to run on specific versions of Apache Tomcat, HAProxy, and Varnish Cache to function properly. The application's operating system-level parameters require tuning. The solution must include a way to automate the deployment of new application versions. The infrastructure should be scalable and faulty servers should be replaced automatically. Which solution should the DevOps engineer use?

Options

  • AUpload the application as a Docker image that contains all the necessary software to Amazon
  • BUpload the application code to an AWS CodeCommit repository with a saved configuration file to
  • CUpload the application code to an AWS CodeCommit repository with a set of .ebextensions files
  • DUpload the application code to an AWS CodeCommit repository with an appspec.yml file to

How the community answered

(44 responses)
  • A
    20% (9)
  • B
    11% (5)
  • C
    5% (2)
  • D
    64% (28)

Explanation

Explanation

Option D is correct because using AWS CodeCommit with an appspec.yml file enables AWS CodeDeploy, which automates application deployments, supports OS-level configuration tuning on EC2 instances, allows specific software versions (Tomcat, HAProxy, Varnish) to be pre-installed on custom AMIs, and integrates with Auto Scaling groups to ensure scalability and automatic replacement of faulty servers.

Why the distractors are wrong:

  • Option A (Docker/ECS): While containers can package specific software versions, Docker abstracts OS-level parameter tuning, making it difficult to configure kernel-level parameters precisely as required.
  • Option B (CodeCommit + saved configuration): A vague "saved configuration file" doesn't map to a specific AWS deployment strategy and lacks the automation and scalability mechanisms needed.
  • Option C (.ebextensions): .ebextensions files are specific to AWS Elastic Beanstalk, which manages the underlying infrastructure for you and restricts control over specific software versions and deep OS-level tuning - the opposite of what's needed here.

Memory Tip: Think "appspec = CodeDeploy = Full Control" - whenever you see requirements for specific software versions, OS tuning, and automated deployments on EC2, the appspec.yml + CodeDeploy combination is your signal. .ebextensions = Beanstalk (managed, less control); appspec.yml = CodeDeploy (custom, full control).

Topics

#Application Migration#Automated Deployments#Configuration Management#Resilient Infrastructure

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice