Ten things that improve the performance of your Java based AWS Lambda
summary
Java AWS Lambda cold starts shrink with concrete steps: move heavy clients to static initialization, pick the lightweight URLConnection HTTP client to save ~80–120 ms, and preconfigure region/endpoints to avoid SDK lookups. Use Lambda Power Tuner to find the memory/CPU sweet spot, enable tiered compilation to drop cold-start P95 from ~5s to ~2s, and use GraalVM native image or provisioned concurrency for dramatic wins — a Spring Boot P95 example falls from ~13s to below 1s. Switch to ARM (Graviton) and avoid bulky layers.
AI-written summary · about
chapters (16)
- 0:00Introduction to Java Lambda performance
- 1:07Understanding cold starts in serverless
- 3:56Increase memory for faster Lambda
- 5:17Move static initialization outside handler
- 6:21Use lightweight dependencies
- 7:48Pre-configure Lambda settings
- 8:51Enable tiered compilation
- 10:36Use provisioned concurrency
- 12:44Avoid heavy frameworks
- 14:08Minimize application size
- 14:31Use GraalVM for native images
- 15:34Explore CRaC for JVM snapshots
- 16:16Leverage parallelization
- 16:59Switch to ARM processors
- 17:20Avoid slow Lambda layers
- 18:24Summary of performance gains
related talks
51mHow To Reduce Cold Starts for Java Serverless Applications in AWS
53mHigh performance Serverless Java on AWS
46mThawing Java on AWS Lambda Reducing Cold Start Times from 11 Seconds to 1
34mThawing Java on AWS Lambda
54mHow to avoid common mistakes and misconceptions when working...
46mReduce Cold Starts for Java Serverless Applications in AWS
44mHow to develop, run and optimize Spring Boot 3 application on AWS Lambda
51mAdapting Java for the Serverless world!
