AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 57

A company wants to use AWS development tools to replace its current bash deployment scripts. The company currently deploys a LAMP application to a group of Amazon EC2 instances behind an Application Load Balancer (ALB). During the deployments, the company unit tests the committed application, stops and starts services, unregisters and re-registers instances with the load balancer, and updates file permissions. The company wants to maintain the same deployment functionality through the shift to using AWS services.
Which solution will meet these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because it effectively integrates AWS CodePipeline and AWS CodeBuild for testing while maintaining service management and instance registration through bash scripts in the appspec.yml file. Options A, B, and C either do not fully utilize the capabilities of AWS services or incorrectly assign tasks that should be handled by AWS CodeDeploy or CodeBuild, leading to less efficient deployments.