Interview Prep/Real-World Interview/Cloud provider issues

A Lambda-based API starts returning 429 "Rate Exceeded" and logs show `TooManyRequestsException` during a marketing campaign.

IntermediateTroubleshootingCloud provider issues
Answer

Likely causes → Lambda hit its concurrency limit: the account's regional limit (1,000 by default), or the function's reserved concurrency. Another function with large reserved concurrency can also starve the unreserved pool your API depends on.

Diagnose →

aws lambda get-account-settings --query 'AccountLimit'
aws lambda get-function-concurrency --function-name api
aws cloudwatch get-metric-statistics --namespace AWS/Lambda --metric-name ConcurrentExecutions \
  --statistics Maximum --period 60 --start-time $(date -u -d '-1 hour' +%FT%TZ) --end-time $(date -u +%FT%TZ)

Check the Throttles metric per function.

Fix → Raise reserved concurrency for the API function, lower it for background functions, and request an account limit increase. Reduce duration (it multiplies concurrency: RPS × seconds).

Prevent → Alarm on Throttles > 0 and on account concurrency above 80%, set API Gateway throttling to protect downstream, and use provisioned concurrency for predictable peaks.

All Real-World Interview questions Roadmap: Interview readiness

More on Cloud provider issues