Troubleshooting & optimization
⏱ ~3-min readAceMark GuideWhat this topic is really about
Exponential backoff with jitter spaces out retries after throttling (e.g., a 429 or ProvisionedThroughputExceeded), reducing contention; the AWS SDKs implement this by default. Disabling retries makes failures worse, and larger pages or strong consistency increase load.
Cache-Control: max-age=3600 instructs caches (including CloudFront and browsers) to consider the object fresh for 3600 seconds (one hour). Content-Type, Authorization, and Content-Encoding serve different purposes and do not set cache lifetime.
See the mechanism
5XX at the gateway while Lambda invocations succeed suggests the gateway is hitting its integration timeout (29s by default) before Lambda completes, or there is an integration mapping issue. A diagram for this topic isn't available yet — the worked example below walks the same reasoning step by step.
An exam-style question, fully explained
CloudWatch shows API Gateway 5XX errors while Lambda invocations succeed. Where to look FIRST?
- Identify what the question tests: CloudWatch shows API Gateway 5XX errors while Lambda invocations succeed..
- 5XX at the gateway while Lambda invocations succeed suggests the gateway is hitting its integration timeout (29s by default) before Lambda completes, or there is an integration mapping issue.
- Lambda code is fine if invocations are succeeding.
Traps the examiner sets
- Content-Type, Authorization, and Content-Encoding serve different purposes and do not set cache lifetime.
Test your recall
Answer each from memory — you'll see instantly whether you're right and why.
Run a focused 10-question mini-mock on Troubleshooting & optimization and see it stick.
Practice more of this topic →