PracticeCF

DOP-C02 Question Bank · Latest 50 Questions Free Preview (Page 5/5)

Questions 41–50 of the latest 50 DOP-C02 questions (5 pages total), with answers and explanations, no login required. Practice all 951 questions online.

Question 41 · No. 942 · Single choice

A company runs an application on an Amazon Elastic Container Service (Amazon ECS) service by using the AWS Fargate launch type. The application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application can take several minutes to process each message from the queue. When the application processes a message, the application reads a file from an Amazon S3 bucket and processes the data in the file. The application writes the processed output to a second S3 bucket. The company uses Amazon CloudWatch Logs to monitor processing errors and to ensure that the application processes messages successfully. The SQS queue typically receives a low volume of messages. However, occasionally the queue receives higher volumes of messages. A DevOps engineer needs to implement a solution to reduce the processing time of message bursts. Which solution will meet this requirement in the MOST cost-effective way?

Answer: A

Explanation: Option A is the most cost-effective solution because it uses AWS Application Auto Scaling to dynamically scale the Fargate ECS service based on the SQS queue size. This allows the service to scale up during message bursts (reducing processing time) and scale down during periods of low traffic (minimizing costs). Since Fargate is a serverless launch type, you only pay for the compute resources when tasks are running, making this both elastic and cost-efficient. Option B only optimizes API calls but doesn't address the processing bottleneck during bursts. Option C is inappropriate because EventBridge is designed for short-lived event-driven tasks, not for long-running message processing (several minutes per message). Option D is not cost-effective because EC2 instances typically require continuous running capacity, whereas Fargate scales to zero during low traffic periods.
Question 42 · No. 943 · Single choice

A global company uses Amazon S3 to host its product catalog website in the us-east-1 Region. The company must improve website performance for users across different geographical regions and must reduce the load on the origin server. The company must implement a highly available cross-Region solution that uses Amazon CloudFront. Which solution will meet these requirements with the LEAST operational effort?

Answer: B

Explanation: Option B is the best choice because it provides a highly available cross-Region solution with the least operational effort. CloudFront with global edge locations automatically routes users to the nearest edge location, improving performance across geographical regions. Origin Shield in us-east-1 (the same region as the origin S3 bucket) effectively reduces the load on the origin server by acting as an additional caching layer. Cache behaviors with optimal TTLs improve cache hit rates for both static and dynamic content. Origin failover to an S3 bucket in a different Region provides high availability, and S3 Cross-Region Replication is a fully managed service that requires no operational overhead. Compared to Option A (multiple distributions = high management effort), Option C (managing ElastiCache and custom replication scripts = high effort), and Option D (Origin Shield in eu-west-1 wouldn't help reduce load on us-east-1 origin, plus Global Accelerator adds unnecessary complexity), Option B offers the optimal balance of performance, availability, and low operational burden.
Question 43 · No. 944 · Single choice

A company is using AWS CodeDeploy to deploy applications to a fleet of Amazon EC2 instances. During a recent deployment, several EC2 instances failed to update successfully. A DevOps engineer must investigate the root cause of the failures and must determine which specific deployment lifecycle events encountered errors. What is the MOST operationally efficient way to access and analyze the detailed deployment logs for troubleshooting?

Answer: D

Explanation: Sending the CodeDeploy agent logs to Amazon CloudWatch Logs and querying them with CloudWatch Logs Insights provides centralized, scalable log analysis. This avoids connecting to each failed EC2 instance individually and is more operationally efficient than using SSH, Session Manager, or an invalid S3 logging approach.
Question 44 · No. 945 · Single choice

A company built its serverless infrastructure on AWS. The infrastructure consists of an Amazon API Gateway REST API, multiple AWS Lambda functions, and Amazon EventBridge. The company wants to be aware of any new supply chain attacks that the company's CI/CD pipelines do not catch. The company needs a solution to detect malicious activity in the deployed application. Which solution meets these requirements?

Answer: B

Explanation: Amazon GuardDuty with Lambda Protection is the correct solution because it specifically monitors Lambda function execution environments for malicious activity, including detecting compromised code from supply chain attacks. GuardDuty can identify suspicious behaviors like crypto mining, backdoors, and data exfiltration within deployed Lambda functions. EventBridge can then be used to route these security findings to notifications or remediation workflows. Option A (WAF) only protects API endpoints from web attacks but cannot detect malicious code within Lambda. Option C (CloudFormation Guard) validates infrastructure templates in CI/CD but does not address attacks already in deployed applications. Option D (Network Firewall) operates at network level and doesn't inspect application behavior in serverless functions.
Question 45 · No. 946 · Single choice

A company has a stateless web application that is deployed on Amazon EC2 instances. The EC2 instances are in a target group behind an Application Load Balancer (ALB). Amazon Route 53 manages the application domain. The company updates the application UI and develops a beta version of the application. The company wants to test the beta version on 10% of its traffic. Which solution will meet these requirements with the LEAST number of configuration changes?

Answer: B

Explanation: Option B is the best choice because it requires the least number of configuration changes. It only involves deploying the beta version to new EC2 instances in a new target group and associating that new target group with the existing ALB listener rule with weights (90% for existing, 10% for beta). The existing ALB and Route 53 setup remain unchanged. Option A requires creating a new ALB and changing Route 53 records (more changes). Option C requires code refactoring to implement feature flags (significant changes). Option D requires containerization and migration to ECS (major changes).
Question 46 · No. 947 · Single choice

A company frequently creates Docker images of an application. The company stores the images in Amazon Elastic Container Registry (Amazon ECR). The company creates both tagged images and untagged images. The company wants to implement a solution to automatically delete images that have not been updated for a long time and are not frequently used. The solution must retain at least a specified number of images. Which solution will meet these requirements with the LEAST operational overhead?

Answer: B

Explanation: Amazon ECR has native lifecycle policy support that allows automatic deletion of images based on age (for untagged images) or based on the number of images, with the ability to set a minimum number of images to retain. This is the built-in solution designed specifically for ECR image management and requires the least operational overhead because it doesn't require managing additional AWS services like Lambda functions or Systems Manager scripts. ECR lifecycle policies are configured directly on the repository and run automatically without any custom code or additional infrastructure.
Question 47 · No. 948 · Single choice

A company uses AWS Lambda functions in the primary operating AWS Region of its AWS account. The company manually created the Lambda functions. The company needs to use a Python-based AWS Cloud Development Kit (AWS CDK) application to manage the Lambda functions. Which solution meets these requirements with the LEAST implementation effort?

Answer: A

Explanation: Option A is the best choice because the AWS CloudFormation IaC generator can directly create an AWS CDK application from the scanned resources, eliminating the need for an intermediate CloudFormation template conversion step. Additionally, using the 'from_asset' parameter for the Lambda handler code object packages the Lambda code directly with the CDK application, removing the dependency on S3 buckets (Code/S3Bucket and Code/S3Key) for storing the deployment package. This approach requires the least implementation effort compared to the other options, which involve additional steps such as template conversion, manual property replacement, or setting up AWS Config inventories and CSV exports.
Question 48 · No. 949 · Single choice

A company produces builds for an open source project every day. The company hosts the open source project in a public code repository that the company supports. The company manually invokes a pipeline in AWS CodePipeline to build artifacts for the project. The company wants to make the build artifacts publicly available on a website that the company hosts in an Amazon S3 bucket. Which solution will meet these requirements with the LEAST operational overhead?

Answer: A

Question 49 · No. 950 · Single choice

An ecommerce company hosts a web application on Amazon EC2 instances that are in an Auto Scaling group. The company deploys the application across multiple Availability Zones. Application users are reporting intermittent performance issues with the application. The company enables basic Amazon CloudWatch monitoring for the EC2 instances. The company identifies and implements a fix for the performance issues. After resolving the issues, the company wants to implement a monitoring solution that will quickly alert the company about future performance issues. Which solution will meet this requirement?

Answer: A

Explanation: Option A is the correct choice because it provides a comprehensive monitoring solution specifically designed to alert on application performance issues. Detailed monitoring increases metric granularity to 1-minute intervals (compared to 5-minute basic monitoring), allowing for quicker detection of performance anomalies. Custom CloudWatch metrics allow tracking application-specific performance indicators (not just infrastructure metrics), and CloudWatch alarms trigger immediate notifications when thresholds are breached. CloudWatch Logs Insights further enhances the ability to identify error patterns. Options B, C, and D focus on distributed tracing/CDN delivery/security/network flow logs respectively, which are not optimal for directly alerting on application performance issues.
Question 50 · No. 951 · Multiple choice

A company deploys a web application on Amazon EC2 instances that are behind an Application Load Balancer (ALB). The company stores the application code in an AWS CodeConnections compatible Git repository. When the company merges code to the main branch, an AWS CodeBuild project is initiated. The CodeBuild project compiles the code, stores the packaged code in AWS CodeArtifact, and invokes AWS Systems Manager Run Command to deploy the packaged code to the EC2 instances. Previous deployments have resulted in defects, EC2 instances that were not running the latest version of the packaged code, and inconsistencies between instances. A DevOps engineer needs to improve the reliability of the deployment solution. Which combination of actions will meet this requirement? (Choose two.)

Answer: B, C

Explanation: The correct combination is B and C. Option B establishes a proper CI/CD pipeline using AWS CodePipeline with a sequential build stage followed by a test stage, which addresses the defects issue by ensuring code is tested after compilation. The pipeline uses CodeDeploy for deployment, which is more reliable than Systems Manager Run Command. Option C creates the necessary CodeDeploy application and deployment group configured with the ALB, which ensures consistent deployment across EC2 instances and handles the issue of instances running inconsistent versions of code. Option A is incorrect because parallel build and test stages are not logical (testing depends on build output). Option D incorrectly introduces Lambda functions unnecessarily since CodeDeploy handles deployments natively. Option E unnecessarily replaces CodeArtifact with S3, which doesn't address the core reliability issues - CodeArtifact was working fine for storage, the problem was in the deployment mechanism.
Prev 12345