Amazon

DOP-C02 practice question 7

AWS Certified DevOps Engineer - Professional (DOP-C02) · free question 7 of 20

Question

A company uses AWS CodePipeline pipelines to automate releases of its application. A typical pipeline consists of three stages: build, test, and deployment. The company has been using a separate AWS CodeBuild project to run scripts for each stage. However, the company now wants to use AWS CodeDeploy to handle the deployment stage of the pipelines. The company has packaged the application as an RPM package and must deploy the application to a fleet of Amazon EC2 instances. The EC2 instances are in an EC2 Auto Scaling group and are launched from a common AMI. Which combination of steps should a DevOps engineer perform to meet these requirements? (Choose two.)
  • A. Create a new version of the common AMI with the CodeDeploy agent installed. Update the IAM role of the EC2 instances to allow access to CodeDeploy. Correct
  • B. Create a new version of the common AMI with the CodeDeploy agent installed. Create an AppSpec file that contains application deployment scripts and grants access to CodeDeploy.
  • C. Create an application in CodeDeploy. Configure an in-place deployment type. Specify the Auto Scaling group as the deployment target. Add a step to the CodePipeline pipeline to use EC2 Image Builder to create a new AMI. Configure CodeDeploy to deploy the newly created AMI.
  • D. Create an application in CodeDeploy. Configure an in-place deployment type. Specify the Auto Scaling group as the deployment target. Update the CodePipeline pipeline to use the CodeDeploy action to deploy the application. Correct
  • E. Create an application in CodeDeploy. Configure an in-place deployment type. Specify the EC2 instances that are launched from the common AMI as the deployment target. Update the CodePipeline pipeline to use the CodeDeploy action to deploy the application.

Explanation

Option A is correct because installing the CodeDeploy agent on a new version of the common AMI and updating the IAM role for EC2 instances ensures that the instances have the necessary permissions and software to execute deployments. Option D is correct as it involves creating an application in CodeDeploy, configuring an in-place deployment type targeting the Auto Scaling group, and integrating this with CodePipeline using the CodeDeploy action to deploy the application.

Need the theory? Learn it free in the DOP-C02 course on Godlike Academy

Practice the whole free set

Answer all 20 free DOP-C02 questions with instant feedback, or unlock all 429 questions with Learn and Exam modes.