AWS Certified DevOps Engineer Professional (DOP-C02)

The AWS Certified DevOps Engineer Professional (DOP-C02) were last updated on today.
  • Viewing page 5 out of 136 pages.
  • Viewing questions 21-25 out of 680 questions
Disclaimers:
  • - ExamTopics website is not related to, affiliated with, endorsed or authorized by Amazon.and Azure
  • - Trademarks, certification & product names are used for reference only and belong to Amazon.and Azure

Topic 1 - Exam A

Question #21 Topic 1

A company hosts a security auditing application in an AWS account. The auditing application uses an IAM role to access other AWS accounts. All the accounts are in the same organization in AWS Organizations. A recent security audit revealed that users in the audited AWS accounts could modify or delete the auditing application's IAM role. The company needs to prevent any modification to the auditing application's IAM role by any entity other than a trusted administrator IAM role. Which solution will meet these requirements?

  • A Create an SCP that includes a Deny statement for changes to the auditing application's IAM role. Include a condition that allows the trusted administrator IAM role to make changes. Attach the SCP to the root of the organization.
  • B Create an SCP that includes an Allow statement for changes to the auditing application's IAM role by the trusted administrator IAM role. Include a Deny statement for changes by all other IAM principals. Attach the SCP to the IAM service in each AWS account where the auditing application has an IAM role.
  • C Create an IAM permissions boundary that includes a Deny statement for changes to the auditing application's IAM role. Include a condition that allows the trusted administrator IAM role to make changes. Attach the permissions boundary to the audited AWS accounts.
  • D Create an IAM permissions boundary that includes a Deny statement for changes to the auditing application’s IAM role. Include a condition that allows the trusted administrator IAM role to make changes. Attach the permissions boundary to the auditing application's IAM role in the AWS accounts.
Suggested Answer: C
NOTE: The solution that will meet the requirements is to create an IAM permissions boundary that includes a Deny statement for changes to the auditing application's IAM role. Including a condition that allows the trusted administrator IAM role to make changes. This ensures that only the trusted administrator IAM role can modify the IAM role of the auditing application. The permissions boundary should be attached to the audited AWS accounts.
Question #22 Topic 1

A development team wants to use AWS CloudFormation stacks to deploy an application. However, the developer IAM role does not have the required permissions to provision the resources that are specified in the AWS CloudFormation template. A DevOps engineer needs to implement a solution that allows the developers to deploy the stacks. The solution must follow the principle of least privilege. Which solution will meet these requirements?

  • A Create an IAM policy that allows the developers to provision the required resources. Attach the policy to the developer IAM role.
  • B Create an IAM policy that allows full access to AWS CloudFormation. Attach the policy to the developer IAM role.
  • C Create an AWS CloudFormation service role that has the required permissions. Grant the developer IAM role a cloudformation:* action. Use the new service role during stack deployments.
  • D Create an AWS CloudFormation service role that has the required permissions. Grant the developer IAM role the iam:PassRole permission. Use the new service role during stack deployments.
Suggested Answer: A
NOTE: The solution (option A) that will meet the requirements is to create an IAM policy that allows the developers to provision the required resources and then attach that policy to the developer IAM role. This ensures that the developers have the necessary permissions to deploy the AWS CloudFormation stacks.
Question #23 Topic 1

A development team uses AWS CodeCommit for version control for applications. The development team uses AWS CodePipeline, AWS CodeBuild. and AWS CodeDeploy for CI/CD infrastructure. In CodeCommit, the development team recently merged pull requests that did not pass long-running tests in the code base. The development team needed to perform rollbacks to branches in the codebase, resulting in lost time and wasted effort. A DevOps engineer must automate testing of pull requests in CodeCommit to ensure that reviewers more easily see the results of automated tests as part of the pull request review. What should the DevOps engineer do to meet this requirement?

  • A Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
  • B Create an Amazon EventBridge rule that reacts to the pullRequestCreated event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
  • C Create an Amazon EventBridge rule that reacts to pullRequestCreated and pullRequestSourceBranchUpdated events. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild badge as a comment on the pull request so that developers will see the badge in their code review.
  • D Create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. Create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action that runs the tests for the application. Program the Lambda function to post the CodeBuild test results as a comment on the pull request when the test results are complete.
Suggested Answer: D
NOTE: The DevOps engineer should create an Amazon EventBridge rule that reacts to the pullRequestStatusChanged event. This event will be triggered when the status of a pull request changes, including when the tests are complete. The engineer should then create an AWS Lambda function that invokes a CodePipeline pipeline with a CodeBuild action to run the tests for the application. Finally, the Lambda function should be programmed to post the CodeBuild test results as a comment on the pull request when the test results are complete. This approach ensures that the reviewers can easily see the automated test results as part of the pull request review.
Question #24 Topic 1

A company is performing vulnerability scanning for all Amazon EC2 instances across many accounts. The accounts are in an organization in AWS Organizations. Each account's VPCs are attached to a shared transit gateway. The VPCs send traffic to the internet through a central egress VPC. The company has enabled Amazon Inspector in a delegated administrator account and has enabled scanning for all member accounts. A DevOps engineer discovers that some EC2 instances are listed in the "not scanning" tab in Amazon Inspector. Which combination of actions should the DevOps engineer take to resolve this issue? (Choose three.)

  • A Verify that AWS Systems Manager Agent is installed and is running on the EC2 instances that Amazon Inspector is not scanning.
  • B Associate the target EC2 instances with security groups that allow outbound communication on port 443 to the AWS Systems Manager service endpoint.
  • C Grant inspector:StartAssessmentRun permissions to the IAM role that the DevOps engineer is using.
  • D Configure EC2 Instance Connect for the EC2 instances that Amazon Inspector is not scanning.
  • E Associate the target EC2 instances with instance profiles that grant permissions to communicate with AWS Systems Manager.
  • F Create a managed-instance activation. Use the Activation Code and the Activation ID to register the EC2 instances.
Suggested Answer: ACE
NOTE: The DevOps engineer should verify that AWS Systems Manager Agent is installed and running on the EC2 instances that Amazon Inspector is not scanning (option A) as this is necessary for Inspector to perform the scan. The engineer should also grant inspector:StartAssessmentRun permissions to the IAM role being used (option C) to allow Inspector to start the assessment run. Lastly, the engineer should associate the target EC2 instances with instance profiles that grant permissions to communicate with AWS Systems Manager (option E) to enable communication between Inspector and the instances.
Question #25 Topic 1

A rapidly growing company wants to scale for developer demand for AWS development environments. Development environments are created manually in the AWS Management Console. The networking team uses AWS CloudFormation to manage the networking infrastructure, exporting stack output values for the Amazon VPC and all subnets. The development environments have common standards, such as Application Load Balancers, Amazon EC2 Auto Scaling groups, security groups, and Amazon DynamoDB tables. To keep up with demand, the DevOps engineer wants to automate the creation of development environments. Because the infrastructure required to support the application is expected to grow, there must be a way to easily update the deployed infrastructure. CloudFormation will be used to create a template for the development environments. Which approach will meet these requirements and quickly provide consistent AWS environments for developers?

  • A Use Fn::ImportValue intrinsic functions in the Resources section of the template to retrieve Virtual Private Cloud (VPC) and subnet values. Use CloudFormation StackSets for the development environments, using the Count input parameter to indicate the number of environments needed. Use the UpdateStackSet command to update existing development environments.
  • B Use nested stacks to define common infrastructure components. To access the exported values, use TemplateURL to reference the networking team’s template. To retrieve Virtual Private Cloud (VPC) and subnet values, use Fn::ImportValue intrinsic functions in the Parameters section of the root template. Use the CreateChangeSet and ExecuteChangeSet commands to update existing development environments.
  • C Use nested stacks to define common infrastructure components. Use Fn::ImportValue intrinsic functions with the resources of the nested stack to retrieve Virtual Private Cloud (VPC) and subnet values. Use the CreateChangeSet and ExecuteChangeSet commands to update existing development environments.
  • D Use Fn::ImportValue intrinsic functions in the Parameters section of the root template to retrieve Virtual Private Cloud (VPC) and subnet values. Define the development resources in the order they need to be created in the CloudFormation nested stacks. Use the CreateChangeSet. and ExecuteChangeSet commands to update existing development environments.
Suggested Answer: B
NOTE: chose option B because it suggests using nested stacks to define common infrastructure components, which allows for easy updates to the deployed infrastructure. It also mentions using Fn::ImportValue intrinsic functions to retrieve VPC and subnet values, and the CreateChangeSet and ExecuteChangeSet commands to update existing development environments.