Tune the constrained resource
Use measured concurrency, queue age, caching and resource duration to choose a change.
Tune the constrained resource
Average utilization can conceal a slow percentile, a hot partition or an exhausted connection pool. Divide waiting time from service time, and relate arrival rate to execution time to estimate concurrent work. Raising parallelism can overwhelm a constrained database. Bound connection counts and let a durable queue absorb bursts when downstream capacity is fixed.
Benchmark Lambda memory settings with the same representative input. More memory also provisions more CPU, so duration and total compute cost may change in different directions. Cache repeated reads only within the permitted freshness window. Batch operations where the API allows it and measure throughput, errors and tail latency after a change.
Worked case
A function is faster with twice the memory. At 1 GB it took one second, and at 2 GB it took 0.6 seconds. Which uses fewer GB-seconds?
Check your reasoning
The first uses 1 GB-second and the second 1.2 GB-seconds. Check the user latency target before choosing. Request fees and other charges are separate.
Second worked case
A worker fleet responds to an accumulating queue by opening thousands of connections. Throughput drops. Which change would you test?
Check your reasoning
Measure completion rate and downstream saturation. Bound concurrency to what the database sustains, reuse healthy connections, and compare oldest-message age before and after the change.
Measure the memory and duration trade-off
Run this local Python 3 fixture. The three profiles must meet a 650 ms latency budget. Compare GB-seconds among the qualifying profiles.
profiles = [(0.5, 1100), (1, 620), (2, 440)]
for memory_gb, duration_ms in profiles:
compute = memory_gb * duration_ms / 1000
if duration_ms <= 650:
print(f"{memory_gb} GB: {compute:.3f} GB-s")
Check your output
1 GB: 0.620 GB-s 2 GB: 0.880 GB-s
The 1 GB profile meets the target with less compute consumption. Tighten the target to 500 ms and only the 2 GB profile qualifies. Real benchmarking also needs a representative duration distribution.
Lambda memory configuration · Official DVA-C03 objectives for this domain
Related lesson in AWS Certified Solutions Architect – Associate. Scale compute against a measured bottleneck.
Choosing a cache from the access path
If users around the world repeatedly read one public image, test a CloudFront cache hit at the edge. For repeated DynamoDB reads that tolerate eventual consistency, evaluate DAX. For shared application results with explicit expiration, consider ElastiCache. Include cold reads, invalidation and stale responses in the benchmark.
Practice with the recording
A performance assistant recommends raising Lambda memory after a slow test run. How would you decide whether to adopt the change?
Check your reasoning
Replay a representative load with the existing and proposed settings. Compare duration, cost per successful request, throttling and time spent in downstream calls. If the delay is a repeated cache miss, a memory increase may leave both latency and cost worse.
Practice the individual exam skills
- 4.3.1–4.3.6 Run the same load with a changed concurrency limit, memory setting or cache configuration, one change at a time. Compare queue age, database connections, hit ratio, latency and cost. Use that comparison to validate or reject an assistant’s optimization proposal.
Tune the constrained resource quiz
Answer 3 questions. Check each answer for an explanation.