exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 7 discussion

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.
  • 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.
  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
bcx
Highly Voted 1 year, 11 months ago
A and D are the correct ones. E is wrong because it says that the instances are on an ASG. C is qrong. You deploy the new RPM on the AMI, you do not create a new AMI every time to install the RPM. B is wrong, the appspec has nothing to do with permissions
upvoted 11 times
...
thanhnv142
Highly Voted 7 months, 1 week ago
Selected Answer: AD
A and D are correct: A: rebuild the AMI and Update the IAM role of the EC2 instances to allow access to CodeDeploy is necessary B: no need to grants AppSpec file access to code CodeDeploy C: <Add a step to the CodePipeline pipeline to use EC2 Image Builder to create a new AMI> : this is unnecessary, we have already done it in option A. Addtionally, recreating AIM each time running the CICD pipiline is unnecessary D: ok E: <Specify the EC2 instances that are launched from the common AMI as the deployment targe>: this is time-consumming. There might by hundreds of EC2 instances and targeting them individually is time-consuming and not effective.
upvoted 6 times
...
Saudis
Most Recent 5 months, 3 weeks ago
the ans is A and D D not E because in deployment the best practise deploy in group not instance
upvoted 1 times
...
thanhnv142
1 year, 3 months ago
A and D: B is incorrect: AppSpec file does not need to be granted access to code deploy. It is code deploy that need the permission to get acess to Appspec file
upvoted 1 times
...
z_inderjot
1 year, 4 months ago
Selected Answer: AD
A - instances need code deploy agent and role D - target as ASG
upvoted 3 times
...
robertohyena
1 year, 5 months ago
A D. IAM role/instance profile requirement for EC2 is to allow EC2 access to S3 buckets used by CodeDeploy. https://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-create-iam-instance-profile.html
upvoted 2 times
...
DZ_Ben
1 year, 6 months ago
Should be BD. EC2 doesn't need a permission to access CodeDeploy. Instead an IAM role associated with Code Deployment Group should have an permission to launch instances in that autoscaling group.
upvoted 2 times
z_inderjot
1 year, 4 months ago
A is right you have to attach IAM role to EC2 instance , for them to be controlled by Code deploy . The agent running in the ec2 instance needs to talk with code deploy .
upvoted 3 times
...
...
sivre
1 year, 6 months ago
Why EC2 instance need access to CodeDeploy??, in the doc is mentioned only S3: "Create or locate an IAM instance profile that allows the Amazon EC2 Auto Scaling group to work with Amazon S3" https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html
upvoted 3 times
harithzainudin
1 year, 4 months ago
As the codedeploy agent is being installed inside the EC2, This agent facilitates the deployment process by coordinating with the CodeDeploy service. Hence, The EC2 instances must have an IAM role that grants them the necessary permissions to interact with CodeDeploy. This step is critical to ensure that the deployment process can be executed securely and successfully
upvoted 3 times
...
...
Ja13
1 year, 8 months ago
Selected Answer: AD
AD as explained en the comments
upvoted 1 times
...
madperro
1 year, 10 months ago
Selected Answer: AD
AD are correct. https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html
upvoted 2 times
Aja1
1 year, 9 months ago
An in-place deployment allows you to deploy your application without creating new infrastructure. The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html
upvoted 2 times
...
...
tycho
2 years ago
A, D; B is wrong, because the AppSpec file cannot grant permissions for CodeDeploy
upvoted 1 times
...
alce2020
2 years ago
A&D it is
upvoted 1 times
...
ele
2 years ago
Selected Answer: AD
A,D. B - wrong, the The 'permissions' section specifies how special permissions, should be applied to the files and directories/folders in the 'files' section C wrong, no need as AMI was already built. E wrong, as ASG is the target.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago