AWS Developer Associate β€” DVA-C02

Domain 4 β€” Troubleshooting & Optimization

Learn to monitor, debug, trace, and optimize AWS applications. This domain covers observability tools, root cause analysis, and performance tuning across all AWS services.

πŸ“Š 18-22% of Exam Weight  |  19 Key Topics  |  50 Practice Questions

πŸ—ΊοΈ What Does Domain 4 Actually Test?

Domain 4 is all about answering the question: "Something is wrong β€” how do you find it and fix it?" It also covers: "Everything is working β€” how do you make it faster and cheaper?"

The exam will give you scenarios like:

  • Your API is returning errors β€” which tools do you use to find why?
  • Your Lambda function is slow β€” what do you check and what do you change?
  • A user says the app is down β€” but AWS Console shows everything is green. How do you investigate?
  • Your RDS database is overloaded with read queries β€” what is the fix?
  • Someone deleted an S3 bucket at 3am β€” how do you find out who did it?
πŸ” The Troubleshooting & Optimization Loop
πŸ“±Application RunningEC2, Lambda, ECS...
β†’
πŸ“ŠEmit SignalsMetrics, Logs, Traces
β†’
πŸ‘οΈObserveCloudWatch, X-Ray
β†’
πŸ””AlertAlarms, SNS
⚑OptimizeCache, Tune, Scale
←
πŸ› οΈFixCode, Config, Arch
←
πŸ”¬Root CauseTraces, Logs, Metrics
←
🚨InvestigateDashboards, Insights
🎯 Exam Focus
The exam heavily tests: (1) knowing WHICH tool to use for WHICH problem, (2) reading CloudWatch metrics/X-Ray traces to identify bottlenecks, (3) picking the RIGHT optimization strategy (cache vs scale vs tune).

πŸ”­ The 3 Pillars of Observability β€” Core Framework

Before diving into individual services, understand this core concept. Every monitoring/troubleshooting question in the exam fits into one of these three pillars:

πŸ“Š Metrics

Numbers that change over time. Examples: CPU usage (80%), requests per second (1000 RPS), error rate (2%), latency (200ms).

AWS Tool: CloudWatch Metrics

Use for: Spotting trends, setting alarms, capacity planning.

πŸ“ Logs

Text records of what happened. Examples: "ERROR: DB connection failed", "User login successful", "Request processed in 450ms".

AWS Tool: CloudWatch Logs

Use for: Debugging specific errors, understanding context, auditing.

πŸ”— Traces

The journey of one request through multiple services. Example: One API call going through API Gateway β†’ Lambda β†’ DynamoDB β†’ SES.

AWS Tool: AWS X-Ray

Use for: Finding bottlenecks in distributed systems, latency analysis.

ℹ️ Why All Three Together?
Metrics tell you something is wrong. Logs tell you what happened. Traces tell you where it slowed down. You need all three to fully troubleshoot modern applications. The exam tests this "Logs + Metrics + Traces together" concept repeatedly.

πŸ“š All 19 Topics at a Glance

Click any topic to go to its detailed notes page. Importance ratings reflect how often the topic appears in exam questions:

Topic 01
☁️ Amazon CloudWatch
⭐⭐⭐⭐⭐ Most Emphasized
Metrics, Logs, Dashboards, Alarms, Logs Insights, Synthetics, ServiceLens, EMF β€” the central monitoring hub for all AWS services.
Topic 02
πŸ” AWS X-Ray
⭐⭐⭐⭐⭐ Critical
Distributed tracing, service maps, trace analysis, annotations, sampling rules β€” the tool for finding bottlenecks in microservices.
Topic 03
πŸ“‹ Logging & Observability
⭐⭐⭐⭐⭐ Critical
Structured logging, centralized logging, Lambda Powertools, the three pillars of observability working together.
Topic 04
πŸ”¬ Root Cause Analysis
⭐⭐⭐⭐⭐ Critical
Debugging methodology, using CloudWatch + X-Ray + Athena together, distributed systems troubleshooting patterns.
Topic 05
πŸ“œ AWS CloudTrail
⭐⭐⭐⭐⭐ Critical
API activity logging, compliance auditing, tracking who did what and when across your entire AWS account.
Topic 06
⚑ Performance Optimization
⭐⭐⭐⭐⭐ Critical
Latency reduction, memory tuning, compute optimization, caching strategies, read scaling techniques.
Topic 07
πŸ€– Amazon CodeGuru
⭐⭐⭐⭐⭐ Critical
Application profiling, code recommendations, performance bottleneck detection, runtime analysis.
Topic 08
Ξ» Lambda Optimization
⭐⭐⭐⭐⭐ Critical
Reserved concurrency, provisioned concurrency, burst concurrency, Lambda Power Tuning, cold starts, memory optimization.
Topic 09
πŸ“¨ SNS + SQS Optimization
⭐⭐⭐⭐ High Priority
Fanout pattern, message filtering, subscription filter policies, optimizing event routing for complex architectures.
Topic 10
🌐 Amazon CloudFront
⭐⭐⭐⭐ High Priority
Edge caching, low-latency delivery, TTL configuration, reducing S3 throttling, static content optimization.
Topic 11
πŸ—„οΈ DynamoDB Optimization
⭐⭐⭐⭐ High Priority
DynamoDB Streams, capturing item modifications, event-driven processing, data consistency patterns.
Topic 12
πŸ”Ž OpenSearch / Athena / Kinesis
⭐⭐⭐⭐ High Priority
Log analytics tools: OpenSearch for search & visualization, Athena for SQL on S3, Kinesis for real-time streaming.
Topic 13
πŸ–₯️ Unified CloudWatch Agent
⭐⭐⭐⭐ High Priority
Collecting logs and metrics from on-premises servers and EC2 instances, configuration, IAM credentials for on-prem.
Topic 14
🚦 API Gateway Monitoring
⭐⭐⭐⭐ High Priority
Latency vs IntegrationLatency, CacheHitCount, CacheMissCount, access logs, monitoring API responsiveness.
Topic 15
🎯 Amazon EventBridge
⭐⭐⭐ Important
Automated remediation, scheduled workflows, event-driven alerts and automated responses to AWS events.
Topic 16
🌊 VPC Flow Logs
⭐⭐⭐ Important
Network traffic visibility, troubleshooting connectivity issues, security group analysis, traffic patterns.
Topic 17
πŸš€ Amazon ElastiCache
⭐⭐⭐ Important
Redis and Memcached, caching strategies (lazy loading, write-through), improving database read performance.
Topic 18
πŸ’‘ AWS Compute Optimizer
⭐⭐⭐ Important
Resource recommendations for EC2, Lambda, EBS, Auto Scaling Groups β€” right-size your resources to cut cost and boost performance.
Topic 19
🐘 Amazon EMR
⭐⭐⭐ Important
Big data processing, Spark/Hadoop clusters, S3 integration for large-scale data processing and analytics.

🎯 Key Exam Patterns β€” What Questions Look Like

The exam does not ask you to memorize APIs. It gives you real-world scenarios and asks which service or approach to use. Here are the most common patterns:

Pattern 1 β€” "Log all AWS API calls"

🎯 Exam Tip
Whenever a question asks about tracking who made an AWS API call, compliance audit logs, or finding who changed/deleted a resource β†’ Answer is always AWS CloudTrail.

Pattern 2 β€” "Find a bottleneck in microservices"

🎯 Exam Tip
Questions about distributed tracing, latency between services, which downstream service is slow, service maps β†’ Answer is always AWS X-Ray.

Pattern 3 β€” "Monitor application metrics and alert"

🎯 Exam Tip
Questions about dashboards, alarms, custom metrics, querying logs, monitoring KPIs β†’ Answer is Amazon CloudWatch.

Pattern 4 β€” "Application is slow β€” Lambda cold starts"

🎯 Exam Tip
When latency-sensitive Lambda functions have inconsistent response times (first call is slow) β†’ Answer is Provisioned Concurrency. When you want to find the optimal memory setting β†’ Lambda Power Tuning.

Pattern 5 β€” "On-premises server logs to CloudWatch"

🎯 Exam Tip
On-prem servers cannot use IAM roles (no AWS metadata service). They need IAM user credentials + the Unified CloudWatch Agent. Not IAM roles β€” that's the common wrong answer.

Pattern 6 β€” "S3 throttling β€” too many requests"

🎯 Exam Tip
When S3 is getting throttled due to many requests for the same objects β†’ Add CloudFront in front. CloudFront caches S3 responses at the edge, reducing requests that hit S3.

πŸ—‚οΈ Quick Reference β€” Right Tool for the Job

Problem/NeedRight ToolWhy
Track API calls / find who deleted resourceAWS CloudTrailLogs every AWS API call with actor & timestamp
Monitor CPU, memory, request countCloudWatch MetricsNumerical time-series data
Search application error messagesCloudWatch Logs / Logs InsightsStore and query log text
Find which microservice is causing latencyAWS X-RayDistributed tracing + service maps
Get alerted when error rate > 5%CloudWatch Alarm + SNSThreshold-based alerting
Test API endpoint every 5 minutesCloudWatch SyntheticsScheduled canary scripts
Profile which code line uses most CPUAmazon CodeGuru ProfilerRuntime performance profiling
Eliminate Lambda cold startsProvisioned ConcurrencyPre-warms Lambda environments
Find optimal Lambda memory settingLambda Power TuningTests multiple memory configs
Cache database readsElastiCache (Redis/Memcached)In-memory caching layer
Reduce S3 load / serve globally fastCloudFrontEdge caching CDN
Query 1TB of logs in S3 with SQLAmazon AthenaServerless SQL on S3
Search and visualize logsAmazon OpenSearchFull-text search + Kibana dashboards
Real-time streaming data ingestionAmazon KinesisHigh-throughput real-time streams
Collect logs from on-prem serversUnified CloudWatch Agent + IAM UserAgent + credentials for non-AWS servers
React to DynamoDB table changesDynamoDB Streams + LambdaEvent-driven change processing
Right-size EC2 / Lambda resourcesAWS Compute OptimizerML-powered recommendations
Route messages to specific SQS queuesSNS Subscription Filter PoliciesFilter by message attributes
Troubleshoot network connectivityVPC Flow LogsIP traffic accept/reject records

πŸ“– How to Use These Notes

1

Start with the ⭐⭐⭐⭐⭐ topics

CloudWatch and X-Ray together make up the biggest chunk of Domain 4. Cover these first. They also appear in other domains.

2

Learn the flow diagrams

Each topic has flow diagrams showing how data moves. Understanding these flows helps you answer scenario questions without memorizing every detail.

3

Pay attention to Exam Tip callouts

Orange callout boxes (🎯 Exam Tip) highlight things the exam specifically tests. These are the "gotcha" moments that separate pass from fail.

4

Do the 50-question practice quiz last

After reading all topics, take the quiz. The quiz covers all 19 topics with scenario-based questions β€” the same style as the real exam.