DVA-C02 exam dumps

DVA-C02 practice question 376 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 376

Select 3

You are developing a serverless application using AWS Lambda and Amazon API Gateway. You want to monitor the performance of your application and need to track both built-in metrics like invocation duration, as well as custom metrics such as the number of specific business transactions processed. Which combination of actions should you take to achieve this?

  1. A

    Enable Amazon CloudWatch Logs for your Lambda function to monitor built-in metrics like invocation duration.

  2. B

    Use the AWS SDK to publish custom metrics to Amazon CloudWatch using the PutMetricData API.

  3. C

    Enable X-Ray tracing for your Lambda function to automatically log custom metrics to Amazon CloudWatch.

  4. D

    Set up a CloudWatch dashboard to visualize both built-in and custom metrics.

  5. E

    Use Amazon S3 events to trigger a Lambda function that logs metrics to CloudWatch.

Show answer and explanation

Correct answers: A, B, D

Explanation

To effectively monitor both built-in and custom metrics for your Lambda application, you should enable Amazon CloudWatch Logs for built-in metrics, use the AWS SDK's PutMetricData API to publish custom metrics, and set up CloudWatch dashboards to visualize all metrics. X-Ray is primarily for tracing, and using S3 events to log metrics is not a standard practice.

  • A. Correct.

    This is correct because Amazon CloudWatch Logs is where built-in metrics for AWS Lambda functions, such as invocation duration and error counts, are automatically sent.

  • B. Correct.

    This is correct because the AWS SDK provides the PutMetricData API, which allows you to publish custom application-specific metrics to Amazon CloudWatch.

  • C. Incorrect.

    This is incorrect because X-Ray is primarily used for distributed tracing and debugging, not for logging custom metrics automatically. You would still need to explicitly publish custom metrics to CloudWatch.

  • D. Correct.

    This is correct because CloudWatch dashboards allow you to visualize both built-in and custom metrics in a single view for monitoring purposes.

  • E. Incorrect.

    This is incorrect because while S3 events can trigger Lambda functions, it does not directly relate to logging built-in or custom metrics to CloudWatch.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam