DOP-C02 Question Bank · Latest 50 Questions Free Preview (Page 1/5)
Questions 1–10 of the latest 50 DOP-C02 questions (5 pages total), with answers and explanations, no login required. Practice all 951 questions online.
Question 1 · No. 902 · Single choice
A company has a web application that is hosted on Amazon EC2 instances. The company is deploying the application into multiple AWS Regions. The application consists of dynamic content such as WebSocket-based real-time product updates. The company uses Amazon Route 53 to manage all DNS records. Which solution will provide multi-Region access to the application with the LEAST latency?
- A. Deploy an Application Load Balancer (ALB) in front of the EC2 instances in each Region. Create a Route 53 A record with a latency-based routing policy. Add IP addresses of the ALBs as the value of the record.
- B. Deploy an Application Load Balancer (ALB) in front of the EC2 instances in each Region. Deploy an Amazon CloudFront distribution with an origin group that contains the ALBs as origins. Create a Route 53 alias record that points to the CloudFront distribution's DNS address.
- C. Deploy a Network Load Balancer (NLB) in front of the EC2 instances in each Region. Create a Route 53 A record with a multivalue answer routing policy. Add IP addresses of the NLBs as the value of the record.
- D. Deploy a Network Load Balancer (NLB) in front of the EC2 instances in each Region. Deploy an AWS Global Accelerator standard accelerator with an endpoint group for each NLB. Create a Route 53 alias record that points to the accelerator's DNS address.
Answer: D
Explanation: The best solution for providing multi-Region access with the least latency is to use AWS Global Accelerator. This service is specifically designed to improve the availability and performance of applications by routing traffic to the optimal endpoint across multiple Regions based on health, geography, and routing policies. It uses the AWS global network infrastructure to route traffic to the nearest healthy endpoint, reducing latency significantly. In contrast, CloudFront (used in option B) is a content delivery network (CDN) primarily for static or cached content rather than dynamic WebSocket-based traffic. Latency-based routing (option A) and multivalue answer routing (option C) do not provide the same level of optimization for dynamic content as Global Accelerator does.
Question 2 · No. 903 · Multiple choice
A company has an application that uses an Amazon API Gateway REST API, AWS Lambda functions, and an Amazon DynamoDB table. The application currently runs in a single AWS Region. The company wants to make the application highly available across two Regions. User traffic must be routed to the Region that provides the least latency. Which combination of steps will meet these requirements? (Choose three.)
- A. Create a replica of the DynamoDB table in a second Region.
- B. Create a global secondary index for the DynamoDB table.
- C. Create copies of the REST API and the Lambda functions in a second Region.
- D. Create health checks in Amazon Route 53. Create DNS records that include a failover routing policy.
- E. Create health checks in Amazon Route 53. Create DNS records that include a latency routing policy.
- F. Create DNS records in Amazon Route 53 that include a multivalue answer routing policy.
Answer: A, C, E
Explanation: To make the application highly available across two regions and route user traffic to the region with the least latency, you need to replicate the necessary components in a second region. First, create a replica of the DynamoDB table (A) to ensure data is accessible in the second region. Second, replicate the REST API and Lambda functions (C) in the second region so that both regions can handle requests independently. Finally, configure Amazon Route 53 with a latency routing policy (E), which ensures that users are directed to the region with the lowest latency based on real-time network performance. Options B, D, and F are incorrect because they don't meet the requirements: a global secondary index (B) doesn’t provide regional redundancy, failover routing (D) does not optimize for latency, and multivalue answer routing (F) is used for returning multiple values rather than optimizing traffic routing.
Question 3 · No. 904 · Single choice
A company wants to build a pipeline to update the standard AMI monthly. The AMI must be updated to use the most recent patches to ensure that launched Amazon EC2 instances are up to date. Each new AMI must be available to all AWS accounts in the company's organization in AWS Organizations. The company needs to configure an automated pipeline to build the AMI. Which solution will meet these requirements with the MOST operational efficiency?
- A. Create an AWS CodePipeline pipeline that uses AWS CodeBuild. Create an AWS Lambda function to run the pipeline every month. Create an AWS CloudFormation template. Share the template with all AWS accounts in the organization.
- B. Create an AMI pipeline by using EC2 Image Builder. Configure the pipeline to distribute the AMI to the AWS accounts in the organization. Configure the pipeline to run monthly.
- C. Create an AWS CodePipeline pipeline that runs an AWS Lambda function to build the AMI. Configure the pipeline to share the AMI with the AWS accounts in the organization. Configure Amazon EventBridge Scheduler to invoke the pipeline every month.
- D. Create an AWS Systems Manager Automation runbook. Configure the automation to run in all AWS accounts in the organization. Create an AWS Lambda function to run the automation every month.
Answer: B
Explanation: The most operationally efficient solution is to use EC2 Image Builder, as it is specifically designed for creating and managing AMIs. It automates the pipeline process, making it easy to configure updates and distribute the AMI to all accounts within an AWS Organization. This method also reduces the need for manual intervention or custom scripting, thus improving efficiency.
Question 4 · No. 905 · Single choice
A company has a workflow that generates a file for each of the company's products and stores the files in a production environment Amazon S3 bucket. The company's users can access the S3 bucket. Each file contains a product ID. Product IDs for products that have not been publicly announced are prefixed with a specific UUID. Product IDs are 12 characters long. IDs for products that have not been publicly announces begin with the letter P. The company does not want information about products that have not been publicly announced to be available in the production environment S3 bucket. Which solution will meet these requirements?
- A. Create a new staging S3 bucket. Generate all files in the new staging bucket. Create an Amazon Macie custom data identifier to identify product IDs in the new bucket that begin with the specific UUID. Launch an Amazon Macie sensitive data discovery job with the custom data identifier. Copy all files that do not have a Macie finding to the production S3 bucket.
- B. Create an Amazon Macie custom data identifier to identify product IDs in the production bucket that begin with the specific UUID. Launch an Amazon Macie sensitive data discovery job with the custom data identifier. Remove all files that have a Macie finding from the production S3 bucket.
- C. Create a new staging S3 bucket. Generate all files in the new staging bucket. Launch an Amazon Macie sensitive data discovery job with a managed data identifier. Copy all files that do not have a Macie finding to the production S3 bucket.
- D. Create an Amazon Macie sensitive data discovery job with a managed data identifier. Remove all files that have a Macie finding from the production S3 bucket.
Answer: A
Explanation: Option A is the best solution because it introduces a staging S3 bucket to generate and store files before they are moved to the production environment. By using Amazon Macie with a custom data identifier, it ensures that only files without sensitive product IDs (those beginning with the specific UUID) are copied to the production S3 bucket. This prevents any unauthorized exposure of unannounced products in the production environment.
Question 5 · No. 906 · Single choice
A company is migrating its web application to AWS. The application uses WebSocket connections for real-time updates and requires sticky sessions. A DevOps engineer must implement a highly available architecture for the application. The application must be accessible to users worldwide with the least possible latency. Which solution will meet these requirements with the LEAST operational overhead?
- A. Deploy an Application Load Balancer (ALB). Deploy another ALB in a different AWS Region. Enable cross-zone load balancing and sticky sessions on the ALBs. Integrate the ALBs with Amazon Route 53 latency-based routing.
- B. Deploy a Network Load Balancer (NLB). Deploy another NLB in a different AWS Region. Enable cross-zone load balancing and sticky sessions on the NLBs. Integrate the NLBs with Amazon Route 53 geolocation routing.
- C. Deploy a Network Load Balancer (NLB) with cross-zone load balancing enabled. Configure the NLB with IP-based targets in multiple Availability Zones. Use Amazon CloudFront for global content delivery. Implement sticky sessions by using source IP address preservation on the NLB.
- D. Deploy an Application Load Balancer (ALB) for HTTP traffic. Deploy a Network Load Balancer (NLB) in each of the company’s AWS Regions for WebSocket connections. Enable sticky sessions on the ALB. Configure the ALB to forward requests to the NLB.
Answer: A
Question 6 · No. 907 · Multiple choice
A company has application code in an AWS CodeConnections compatible Git repository. The company wants to configure unit tests to run when pull requests are opened. The company wants to ensure that the test status is visible in pull requests when the tests are completed. The company wants to save output data files that the tests generate to an Amazon S3 bucket after the tests are finished. Which combination of solutions will meet these requirements? (Choose three.)
- A. Create an IAM service role to allow access to the resources that are required to run the tests.
B Create a pipeline in AWS CodePipeline that has a test stage. Create a trigger to run the pipeline when pull requests are created or updated. Add a source action to report test results.
- C. Create an AWS CodeBuild project to run the tests. Enable webhook triggers to run the tests when pull requests are created or updated. Enable build status reporting to report test results.
- D. Create a buildspec.yml file that has a reports section to upload output files when the tests have finished running.
- E. Create a buildspec.yml file that has an artifacts section to upload artifacts when the tests have finished running.
- F. Create an appspec.yml file that has a files section to upload output files when the tests have finished running.
Answer: A, C, E
Explanation: To meet the requirements, the company needs a combination of solutions. First, an IAM service role is necessary to grant the required permissions for running tests and uploading files (A). Next, AWS CodeBuild is ideal for running unit tests when pull requests are created or updated, and enabling build status reporting ensures that test results are visible in pull requests (C). Finally, output data files generated by the tests must be uploaded to an S3 bucket, which can be achieved using the artifacts section in a buildspec.yml file (E). The other options either do not fit the use case or introduce incorrect configurations.
Question 7 · No. 908 · Single choice
A software development team is implementing a CI/CD pipeline for its web application. The team is using AWS CodeBuild to compile Java-based source code and to run unit tests. The team needs to store the artifacts that are created by the CodeBuild project. Which solution will meet this requirement?
- A. Create an Amazon S3 bucket. Configure the S3 bucket as an artifact output location in the project. Add the artifact locations to the project's buildspec file. Configure an S3 bucket policy that allows the CodeBuild project's resource access role to access the S3 bucket.
- B. Create an Amazon S3 bucket. Configure the S3 bucket as an artifact output location in the project's buildspec file. Add the artifact locations to the project's buildspec file.
Configure an S3 bucket policy that allows the CodeBuild service role to access the S3 bucket.
- C. Configure an Amazon Elastic File System (Amazon EFS) file system as a file system location for the project. Configure the EFS file system as the artifact output location in the project's buildspec file. Configure a file system policy that allows CodeBuild to access the file system.
- D. Create an Amazon Elastic Block Store (Amazon EBS) volume. Configure the EBS volume as the artifact output location in the project's buildspec file. Configure an IAM role that allows CodeBuild to access the volume.
Answer: A
Explanation: The best solution is to use Amazon S3 as the artifact storage location because S3 is a highly durable and scalable object storage service, making it ideal for storing build artifacts. AWS CodeBuild integrates seamlessly with S3, allowing you to specify an S3 bucket as the output location in the buildspec file. Additionally, configuring an S3 bucket policy ensures secure access for the CodeBuild project's resource access role. The other options (B, C, and D) either misconfigure permissions or suggest services that are not ideal for this use case (EFS and EBS are not typically used for storing artifacts).
Question 8 · No. 909 · Single choice
A DevOps engineer updates an AWS CloudFormation stack to add a nested stack that includes several Amazon EC2 instances. When the DevOps engineer attempts to deploy the updated stack, the nested stack fails to deploy. What should the DevOps engineer do to determine the cause of the failure?
- A. Use the CloudFormation detect root cause capability for the failed stack to analyze the failure and return the event that is the most likely cause for the failure.
- B. Query failed stacks by specifying the root stack as the ParentId property. Examine the StackStatusReason property for all returned stacks to determine the reason the nested stack failed to deploy.
- C. Activate AWS Systems Manager for the AWS account where the application runs. Use the AWS Systems Manager Automation AWS-SupportTroubleshootCFNCustomResource runbook to determine the reason the nested stack failed to deploy.
- D. Configure the CloudFormation template to publish logs to Amazon CloudWatch. View the CloudFormation logs for the failed stack in the CloudWatch console to determine the reason the nested stack failed to deploy.
Answer: B
Question 9 · No. 910 · Multiple choice
A company uses AWS Organizations to manage multiple AWS accounts. The accounts are in an OU that has a policy attached to allow all actions. The company is migrating several Git repositories to a specified AWS CodeConnections supported Git provider. The Git repositories manage AWS CloudFormation stacks for application infrastructure that the company deploys across multiple AWS Regions. The company wants a DevOps team to integrate CodeConnections into the CloudFormation stacks. The DevOps team must ensure that company staff members can integrate only with the specified Git provider. The deployment process must be highly available across Regions. Which combination of steps will meet these requirements? (Choose three.)
- A. Add a new SCP statement to the OU that denies the CodeConnections CreatingConnections action where the provider type is not the specified Git provider.
- B. Add a new SCP statement to the OU that allows the CodeConnections CreatingConnections action where the provider type is the specified Git provider.
- C. Use CodeConnectlons to configure a single CodeConnections connection to each Git repository.
- D. Use CodeConnections to create a CodeConnections connection from each Region where the company operates to each Git repository.
- E. Use CodeConnections to create a CodeConnections repository link. Update each CfoudFormation stack to sync from the Git repository.
- F. For each Git repository, create a pipeline in AWS CodePipefine that has the Git repository set as the source and a CloudFormation deployment stage.
Answer: A, D, E
Explanation: The question asks for a combination of steps to meet the requirements. Step A ensures that only the specified Git provider can be used by denying other provider types via an SCP. Step D ensures high availability by creating connections from each Region to the Git repositories. Step E integrates CloudFormation stacks with the Git repositories through repository links, allowing synchronization and deployment. Steps B and C are not necessary because they either allow broader permissions unnecessarily or duplicate functionality already provided by other steps.
Question 10 · No. 911 · Single choice
A DevOps engineer successfully creates an Amazon Elastic Kubernetes Service (Amazon EKS) cluster that includes managed node groups. When the DevOps engineer tries to add node groups to the cluster, the cluster returns an error that states, "NodeCreationFailure: Instances failed to join the Kubernetes cluster." The DevOps engineer confirms that the EC2 worker nodes are running and that the EKS cluster is in an active state. How should the DevOps engineer troubleshoot this issue?
- A. Ensure that the EKS cluster's VPC subnets do not overlap with the 172.17.0.0/16 CIDR range.
- B. Use kubectl to update the kubeconfig file to use the credentials that created the cluster.
- C. Run the AWSSupport-TroubleshootEKSWorkerNode runbook.
- D. Create an AWS Identity and Access Management (IAM) OpenID Connect (OIDC) provider for the cluster.
Answer: C
Explanation: The error 'NodeCreationFailure: Instances failed to join the Kubernetes cluster' indicates that the EC2 worker nodes are running but unable to register with the EKS control plane. AWS provides a Systems Manager Automation runbook called 'AWSSupport-TroubleshootEKSWorkerNode' specifically designed to diagnose and resolve common issues preventing worker nodes from joining an EKS cluster. This runbook automates checks for IAM permissions, networking, VPC configuration, and other prerequisites. While options A, B, and D address potential underlying causes, option C is the most direct and comprehensive troubleshooting step recommended by AWS for this exact scenario.