Exam DOP-C02 All QuestionsBrowse all questions from this exam
Question 58

A company runs an application on Amazon EC2 instances. The company uses a series of AWS CloudFormation stacks to define the application resources. A developer performs updates by building and testing the application on a laptop and then uploading the build output and CloudFormation stack templates to Amazon S3. The developer's peers review the changes before the developer performs the CloudFormation stack update and installs a new version of the application onto the EC2 instances.

The deployment process is prone to errors and is time-consuming when the developer updates each EC2 instance with the new application. The company wants to automate as much of the application deployment process as possible while retaining a final manual approval step before the modification of the application or resources.

The company already has moved the source code for the application and the CloudFormation templates to AWS CodeCommit. The company also has created an AWS CodeBuild project to build and test the application.

Which combination of steps will meet the company’s requirements? (Choose two.)

    Correct Answer: A, D

    To meet the company's requirements, the deployment process needs to be automated using AWS tools while incorporating a manual approval step. First, setting up AWS CodeDeploy requires creating an application group and a deployment group, and installing the CodeDeploy agent on the EC2 instances to allow automated deployments. Second, using AWS CodePipeline is essential to invoke the CodeBuild job, create CloudFormation change sets for each application stack, and include a manual approval step. After the changes are approved, running the CloudFormation change sets and starting the CodeDeploy deployment automate the process efficiently. This combination ensures that the deployment process is streamlined while retaining the necessary manual approval before updates are applied.

Discussion
tartarus23Options: AD

(A) This step sets up the environment to use AWS CodeDeploy for application deployments. CodeDeploy uses an agent installed on the EC2 instances to perform the deployment tasks. (D) This option uses CodePipeline to orchestrate the process. CodeBuild is used to build and test the application. CloudFormation is used to prepare the infrastructure updates as change sets. A manual approval step is inserted before applying the changes. After approval, the CloudFormation change sets are applied, and then CodeDeploy is invoked to deploy the new version of the application to the EC2 instances.

2pkOptions: BD

Code deploy agent installation can be skipped when you setting up Code Deploy group .. e.g. You can configure automatic installation and updates of the CodeDeploy agent when you create your deployment group in the console. Why A is wrong - cause there is no application group only deployment group and when setting up deployment group you can setup agent installation automatically. https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-ec2-create.html#:~:text=Note-,You%20can%20configure%20automatic%20installation%20and%20updates%20of%20the%20CodeDeploy%20agent%20when%20you%20create%20your%20deployment%20group%20in%20the%20console.,-Did%20this%20page

Jaguaroooo

i agree with you on the explanation that there are no application group. but how can you use code deploy to push code to the EC2's if they have no agents on them?

ky11223344Options: BD

There is no application group in CodeDeploy

fanq10

- EC2 needs to install the CodeDeploy agent. - CodeDeploy does not need to register EC2 instances, instead of it uses tag filter. Therefore, B is incorrect, A is correct. Final answer: AD

Karamen

@fanq10 you are right. CodeDeploy doesn't require registering EC2 instances, it fillters by tag

4555894Options: AD

A- https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent.html D - This option correctly utilizes AWS CodePipeline to invoke the CodeBuild job and create CloudFormationchange sets. It adds a manual approval step before executing the change sets and starting the AWSCodeDeploy deployment. This ensures that the deployment process is automated while retaining the final manual approval step.

alex_heavyOptions: BD

B: https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent.html You can configure automatic installation and updates of the CodeDeploy agent when you create your deployment group in the console. https://docs.aws.amazon.com/codedeploy/latest/userguide/applications.html After you configure instances, but before you can deploy a revision, you must create an application in CodeDeploy. An application is simply a name or container used by CodeDeploy to ensure the correct revision, deployment configuration, and deployment group are referenced during a deployment. https://docs.aws.amazon.com/codedeploy/latest/userguide/application-revisions.html In CodeDeploy, a revision contains a version of the source files CodeDeploy will deploy to your instances or scripts CodeDeploy will run on your instances. https://aws.amazon.com/ru/blogs/devops/using-codedeploy-environment-variables/

madperroOptions: AD

AD is right.

Flyingdagger

There is nothing like application group in code deploy answer is BD

eleOptions: AD

AD need codedeploy agent, and review CFN changes set, before run update

PhuocTOptions: AD

A and D are correct

xdkonorek2Options: AD

for those who vote B: what is creating environment in code deploy? I think application group means application and registering instances with code deploy is basically creating deployment group, and instance is not registered manually it has to be tagged

seetptOptions: AD

AD is ok

Shasha1

AD Needs to install code deploy agent and give necessary permission for access S3 bucket where it will be stored the application revision. then EC2 instance will download the application revision from the S3 bucket. Therefore Answer A is correct. if we use System manager only the EC2 instance can be installed and updated automatically.

thanhnv142

A and D are correct: A - To run codedploy on EC2, need agent. D - The approval step will trigger both cloudformation and codedeploy B: no mention of installing agent on EC2 C: The approval step doesnot affect CloudFormation updates, which is not accepted E: The approval step only allows codedeploy but not CloudFormation updates

Jaguaroooo

AD is the correct answer, you need the CD agent in order to use code deploy. And D is correct also because you can do your testing during codebuild and finally do a change set review and then approval.

noriknic

The CodeDeploy agent must be installed on your Amazon EC2 instance before using it in CodeDeploy deployments

alce2020Options: BD

B and D are correct