The company wants to replace its bash deployment scripts with AWS developer tools while preserving these deployment steps: run unit tests, stop/start services, unregister and re-register instances with an ALB, and update file permissions. Which solution will provide the same deployment functionality using AWS services?
Choose an answer
Tap an option to check your answer.
Correct answer: Use AWS CodePipeline to trigger AWS CodeBuild to test the application. Use bash scripts invoked by AWS CodeDeploy's appspec.yml file to restart services. Unregister and re-register the instances in the AWS CodeDeploy deployment group with the ALB. Update the appspec.yml file to update file permissions without a custom script..
Why this is the answer
The correct solution leverages CodePipeline for orchestration, CodeBuild for testing, and CodeDeploy for deployment. CodePipeline orchestrates the entire process, triggering CodeBuild for unit tests. CodeDeploy's appspec.yml file is ideal for managing application lifecycle events on instances. It can execute bash scripts to restart services, which is a common practice. CodeDeploy also natively handles instance deregistration and re-registration with an ALB as part of its deployment lifecycle, ensuring traffic is managed correctly during updates. Updating file permissions can be directly specified in the appspec.yml without needing custom scripts, simplifying the process. Incorrect options: The first option incorrectly suggests using CodeDeploy's appspec.yml for deregistering/registering instances with an ALB via bash scripts. While possible, CodeDeploy handles this natively and more robustly. The second option incorrectly suggests using CodeDeploy's deployment group to test the application; CodeDeploy is for deployment, not testing. CodeBuild is the appropriate service for testing. The third option incorrectly suggests using CodeBuild to unregister and re-register instances with the ALB, which is a deployment-related task best handled by CodeDeploy.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed