Monitoring and Troubleshooting Study Guide — DVA-C02

12% of the exam · domain 5 of 5 · AWS Developer Associate · Free Monitoring and Troubleshooting practice questions

0 of 43 topics covered
Domain 5 of 5

Troubleshooting and Optimization (DVA-C02 Domain Guide)

This domain tests your ability to identify performance problems, debug failures, and optimize cost and throughput across common AWS services. Expect scenario-based questions where you must choose the right tool for a given symptom, configure a service correctly, or distinguish between two plausible approaches. Memorize thresholds, query syntax patterns, and the decision criteria that separate correct answers from distractors.


Amazon CloudWatch: Metrics, Logs, Alarms, and Dashboards

CloudWatch is the central observability tool. Key exam facts:

  • Standard vs. detailed monitoring: EC2 standard = 5-minute intervals; detailed = 1-minute (extra cost). Lambda always publishes at 1-minute granularity.
  • Custom metrics: use PutMetricData API. Default resolution is 60 seconds; high-resolution custom metrics go down to 1 second but cost more.
  • Alarms: can trigger SNS, EC2 actions, Auto Scaling, or Systems Manager OpsItems. An alarm in INSUFFICIENT_DATA state is not the same as OK—watch for trick questions here.
  • Log retention: not infinite by default; you must set a retention policy or logs persist forever at cost.
  • Metric filters: extract numeric values from log data to create custom metrics. They do not apply retroactively.

CloudWatch Logs Insights: Query Syntax

Logs Insights uses its own query language. Exam-relevant patterns:

fields @timestamp, @message
| filter @message like /ERROR/
| stats count(*) by bin(5m)
| sort @timestamp desc
| limit 20
  • filter narrows results; stats aggregates; bin() groups by time window.
  • parse extracts fields from unstructured text using glob or regex patterns.
  • Queries run across one or more log groups; you can query up to 50 log groups simultaneously.
  • Use @duration, @billedDuration, @memorySize, @maxMemoryUsed for Lambda-specific analysis.

AWS X-Ray: Tracing and Service Maps

X-Ray provides distributed tracing. Know the vocabulary precisely:

  • Segment: one service's contribution to a trace (e.g., Lambda function, EC2 app).
  • Subsegment: a unit of work within a segment (e.g., downstream HTTP call, DynamoDB query).
  • Annotations: indexed key-value pairs used for filtering traces. Limited to 50 per trace.
  • Metadata: arbitrary data attached to segments; not indexed, cannot be used in filter expressions.
  • Sampling: by default, X-Ray records 1 request/second + 5% of additional requests. Custom sampling rules let you increase/decrease this per service or route.
  • Service map: visual graph showing latency, error rates, and call relationships—the primary tool for pinpointing bottlenecks in microservices.
  • Lambda active tracing must be explicitly enabled (either in function config or via SAM Tracing: Active).

Lambda Performance Optimization

  • Memory allocation directly controls CPU allocation. More memory = more CPU = faster execution = potentially lower cost if duration drops enough. Use AWS Lambda Power Tuning (open-source Step Functions state machine) to find the optimal setting.
  • Cold starts: occur when a new execution environment is initialized. Mitigate with Provisioned Concurrency (pre-warms environments) or keeping functions warm via scheduled pings (less reliable).
  • Deployment package size: smaller packages reduce cold start init time. Use Lambda Layers for shared dependencies.
  • Execution time limit: max 15 minutes. For longer workloads, use Step Functions or Fargate.
  • Dead-letter queues (DLQ) capture failed async invocations; Lambda Destinations are more flexible—route success and failure to SQS, SNS, EventBridge, or another Lambda.

Unlock with a paid plan

1 more section (about 642 words) continue below. Every paid plan unlocks all DVA-C02 study guides, the full question bank and mock exams, from $4.97/month.