AWS Certified DevOps Engineer - Professional

Here you have the best Amazon DOP-C02 practice exam questions

  • You have 277 total questions to study from
  • Each page has 5 questions, making a total of 56 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 15, 2024
Question 1 of 277

A company has a mobile application that makes HTTP API calls to an Application Load Balancer (ALB). The ALB routes requests to an AWS Lambda function. Many different versions of the application are in use at any given time, including versions that are in testing by a subset of users. The version of the application is defined in the user-agent header that is sent with all requests to the API.

After a series of recent changes to the API, the company has observed issues with the application. The company needs to gather a metric for each API operation by response code for each version of the application that is in use. A DevOps engineer has modified the Lambda function to extract the API operation name, version information from the user-agent header and response code.

Which additional set of actions should the DevOps engineer take to gather the required metrics?

    Correct Answer: A

    The best approach for gathering metrics with minimal complexity is to modify the Lambda function to log the API operation name, response code, and version number to Amazon CloudWatch Logs. Then, configure a CloudWatch Logs metric filter to increment a metric for each API operation. By specifying response code and application version as dimensions, this method efficiently captures the necessary metrics and leverages existing AWS services directly, making it a simple and effective solution for the given requirements.

Question 2 of 277

A company provides an application to customers. The application has an Amazon API Gateway REST API that invokes an AWS Lambda function. On initialization, the Lambda function loads a large amount of data from an Amazon DynamoDB table. The data load process results in long cold-start times of 8-10 seconds. The DynamoDB table has DynamoDB Accelerator (DAX) configured.

Customers report that the application intermittently takes a long time to respond to requests. The application receives thousands of requests throughout the day. In the middle of the day, the application experiences 10 times more requests than at any other time of the day. Near the end of the day, the application's request volume decreases to 10% of its normal total.

A DevOps engineer needs to reduce the latency of the Lambda function at all times of the day.

Which solution will meet these requirements?

    Correct Answer: C

    To reduce the latency of the Lambda function at all times of the day, the best solution is configuring provisioned concurrency on the Lambda function along with configuring AWS Application Auto Scaling. Provisioned concurrency ensures that a predetermined number of Lambda function instances are always initialized and ready to respond, thereby mitigating cold start delays. Implementing auto-scaling allows the function to dynamically adjust the number of provisioned concurrent instances based on the application's varying load throughout the day, thus efficiently handling traffic spikes and minimizing costs during low-traffic periods.

Question 3 of 277

A company is adopting AWS CodeDeploy to automate its application deployments for a Java-Apache Tomcat application with an Apache Webserver. The development team started with a proof of concept, created a deployment group for a developer environment, and performed functional tests within the application. After completion, the team will create additional deployment groups for staging and production.

The current log level is configured within the Apache settings, but the team wants to change this configuration dynamically when the deployment occurs, so that they can set different log level configurations depending on the deployment group without having a different application revision for each group.

How can these requirements be met with the LEAST management overhead and without requiring different script versions for each deployment group?

    Correct Answer: B

    To address the requirement of dynamically changing the log level configuration based on the deployment group with minimal management overhead, the most effective approach is to use the CodeDeploy environment variable DEPLOYMENT_GROUP_NAME. This variable can be used by a script to identify the deployment group the instance belongs to and adjust the log level settings accordingly. By referencing this script as part of the BeforeInstall lifecycle hook in the appspec.yml file, it ensures the settings are configured before the application files are installed, maintaining a single script version across all deployment groups.

Question 4 of 277

A company requires its developers to tag all Amazon Elastic Block Store (Amazon EBS) volumes in an account to indicate a desired backup frequency. This requirement Includes EBS volumes that do not require backups. The company uses custom tags named Backup_Frequency that have values of none, dally, or weekly that correspond to the desired backup frequency. An audit finds that developers are occasionally not tagging the EBS volumes.

A DevOps engineer needs to ensure that all EBS volumes always have the Backup_Frequency tag so that the company can perform backups at least weekly unless a different value is specified.

Which solution will meet these requirements?

    Correct Answer: D

    To ensure that all EBS volumes always have the Backup_Frequency tag, the best solution is to use AWS CloudTrail in combination with Amazon EventBridge to react to specific EBS volume events. The solution should be able to handle both the creation and modification of EBS volumes to apply the Backup_Frequency tag correctly. This can be achieved by creating an EventBridge rule that reacts to EBS CreateVolume events or EBS ModifyVolume events. Then, a custom AWS Systems Manager Automation runbook can be configured to apply the Backup_Frequency tag with a value of weekly and specified as the target of the rule. This approach ensures that the tag is applied immediately upon the creation or modification of any EBS volume, meeting the requirement for continuous tagging compliance.

Question 5 of 277

A company is using an Amazon Aurora cluster as the data store for its application. The Aurora cluster is configured with a single DB instance. The application performs read and write operations on the database by using the cluster's instance endpoint.

The company has scheduled an update to be applied to the cluster during an upcoming maintenance window. The cluster must remain available with the least possible interruption during the maintenance window.

What should a DevOps engineer do to meet these requirements?

    Correct Answer: A

    The best approach to keep the Aurora cluster available with minimal interruption during a maintenance window is to add a reader instance to the Aurora cluster and update the application to use the appropriate endpoints: the cluster endpoint for write operations and the reader endpoint for read operations. This configuration allows read operations to be offloaded to the reader instance, thereby reducing the load on the primary instance and ensuring that reads can continue even if the primary instance is undergoing maintenance. The Multi-AZ option on Amazon Aurora needs to be set at the time of cluster creation, not afterward, which makes it not applicable in this scenario. Therefore, the correct solution is to add a reader instance for increased availability and load balancing during maintenance.