The Symptom
During a major marketing push, our serverless signup API dropped all traffic. API Gateway returned `504 Gateway Timeout`. CloudWatch logs showed thousands of new Lambda environments spinning up, but execution times were hitting 5.5 seconds.
Root Cause Analysis
Our backend was written in Java/Spring Boot and deployed as a monolithic AWS Lambda function. When a Lambda function experiences a "cold start" (initializing a brand new container), the JVM has to boot, Spring Boot does component scanning, and DB connections are established. This took ~5 seconds. Because traffic spiked instantly from 10 to 500 req/sec, AWS spun up 490 new Lambda containers simultaneously. All of them hit the 5-second cold start penalty. However, API Gateway had a hard timeout of 3 seconds.
Resolution
We enabled "AWS Lambda Provisioned Concurrency" for the signup endpoint, keeping 100 containers permanently warm. Long-term, we migrated the Spring Boot monolith to a lightweight Node.js/Go function, reducing cold start times to 150ms.
critical
Configure Provisioned Concurrency for all critical user path Lambdas
@Backend Team
high
Rewrite Java monolith Lambdas into smaller Go functions
@Architecture Team
Discussions 0