DVA-C02 exam dumps

DVA-C02 practice question 356 of 399

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

DVA-C02 Question 356

Select 3

You are developing a serverless application using AWS Lambda and need to implement observability to monitor application performance and troubleshoot issues effectively. Which of the following actions should you take to instrument your code for observability?

  1. A

    Use AWS X-Ray to trace requests across distributed services by integrating it into your Lambda function.

  2. B

    Log all sensitive user data to Amazon CloudWatch Logs for easier debugging.

  3. C

    Use custom metrics with Amazon CloudWatch to monitor key performance indicators (KPIs) in your Lambda function.

  4. D

    Integrate structured logging using a library like AWS SDK's Logger to provide detailed log context.

  5. E

    Enable AWS Trusted Advisor to monitor real-time metrics for your Lambda function.

Show answer and explanation

Correct answers: A, C, D

Explanation

To instrument your code for observability in AWS Lambda, you should use tools like AWS X-Ray for distributed tracing, Amazon CloudWatch for custom metrics, and structured logging to provide detailed context in logs. These practices help monitor application performance and identify issues effectively, while avoiding actions like logging sensitive user data, which can compromise security.

  • A. Correct.

    Correct: AWS X-Ray provides distributed tracing capabilities, allowing you to analyze and debug requests that travel through multiple services.

  • B. Incorrect.

    Incorrect: Logging sensitive user data is a security risk and violates best practices for handling sensitive information. Instead, sensitive data should be masked or omitted from logs.

  • C. Correct.

    Correct: Custom metrics in Amazon CloudWatch allow tracking of specific KPIs, such as execution time or error rates, which are critical for observability.

  • D. Correct.

    Correct: Structured logging improves log readability and provides detailed context, making it easier to debug and analyze application behavior.

  • E. Incorrect.

    Incorrect: AWS Trusted Advisor provides recommendations for cost optimization, security, and performance but does not directly monitor real-time metrics or aid in code-level observability.

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