DVA-C03 · LESSON 4

Troubleshooting and Optimization22% · 2 topics

Correlate request and trace IDs to locate latency with logs, metrics and traces. Tune Lambda memory and concurrency from measurements and protect databases with connection pooling. Validate AI suggestions as hypotheses. Define freshness and invalidation before adding caches.

4.1Diagnose and optimize with evidence

Concept

Correlate request and trace IDs to locate latency with logs, metrics and traces. Tune Lambda memory and concurrency from measurements and protect databases with connection pooling. Validate AI suggestions as hypotheses. Define freshness and invalidation before adding caches.

How it works / steps

  1. Write requirements and success criteria first.
  2. Use a test environment and retain success and failure evidence.
  3. Review the result, then check your decisions with domain practice below.

Workplace example

Compare p95 latency, error rate and cost under the same load before and after a change.

Common confusions and exam tips

Mini quiz

Q1. A Lambda function behind API Gateway overloads the backend DB during sudden traffic spikes. You want to limit how much the API accepts. Which is most appropriate?

  1. Maximize Lambda memory to speed up processing
  2. Delete API Gateway, let user apps connect directly to the DB, and adjust connections in the app
  3. Configure API Gateway throttling (rate and burst limits)
  4. Change the DB password to stop connections temporarily
Show answer and explanation

Answer: C Configure API Gateway throttling (rate and burst limits)

API Gateway throttling sets request limits per stage, method or usage plan to protect the backend.

Q2. Many Lambda functions connect to RDS and hit the connection limit, causing errors. Which is the most appropriate solution with minimal app changes?

  1. Stop and start the RDS instance to reset connections
  2. Move RDS to a public subnet to make connecting easier
  3. Remove Lambda's concurrency limit so all processing finishes quickly at once
  4. Use RDS Proxy to pool and share database connections
Show answer and explanation

Answer: D Use RDS Proxy to pool and share database connections

RDS Proxy pools and reuses connections, consolidating many short-lived connections. It also speeds up switching during failover.

Reference links

4.2Design high-performing and elastic compute solutions

Concept

For performance, choose an instance family that fits the workload (C: compute, R: memory, I: storage, G/P: GPU, Graviton for high price-performance) and scale elastically with Auto Scaling. Scaling policies include target tracking (keep CPU at 50% and so on), step, scheduled and predictive scaling. Use a cluster placement group for low-latency HPC.

How it works / steps

  1. Check the bottleneck (CPU, memory, I/O, network) in CloudWatch
  2. Choose a suitable instance family (also refer to Compute Optimizer recommendations)
  3. Use target tracking scaling as the base and add schedules for predictable peaks
  4. Use a warm pool if launching takes a long time
  5. Consider Lambda for short event-driven processing and Fargate for containers

Workplace example

For an internal system with an access spike at 9:00 every morning, add instances on a schedule at 8:45, and keep CPU at 60% with target tracking during the day.

Common confusions and exam tips

Mini quiz

Q1. A Lambda function returns “throttling” errors during bursts. It is critical processing, so you want to guarantee execution capacity. What should you consider first?

  1. Increase the function's memory to shorten each run
  2. Move the function out of the VPC to shorten startup
  3. Check the concurrency quota and set reserved concurrency on the critical function
  4. Set provisioned concurrency broadly on other functions too
Show answer and explanation

Answer: C Check the concurrency quota and set reserved concurrency on the critical function

Check the account's concurrency limit and per-function reserved concurrency. Reserving concurrency guarantees capacity for that function. [Other options] Shorter runs help but do not reserve capacity. Setting it broadly on other functions consumes the account pool and shrinks the critical function's share. Leaving the VPC does not fix throttling.

Q2. A Lambda function takes a long time to run and has spare memory. Which is the most appropriate way to make it faster?

  1. Recreate the function in another Region
  2. Shorten the timeout to cut processing early and leave the rest for next time
  3. Limit concurrency to 1
  4. Increase the function's memory (CPU increases proportionally)
Show answer and explanation

Answer: D Increase the function's memory (CPU increases proportionally)

Lambda allocates CPU in proportion to the memory setting. CPU-bound processing gets faster with more memory, and shorter duration can even lower cost.

Reference links

Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.

Notes (unofficial, original questions, no pass guarantee)