we recently noticed that in our Customer facing function (lambda that consumed by APIGW) in our platform, we experiencing around ~1s
of cold start. It's a lot for us and we are trying to fight this.
REPORT RequestId: 2545824b-66a3-44d2-871d-0abd7b5aa468 Duration: 213.83 ms Billed Duration: 300 ms Memory Size: 512 MB Max Memory Used: 91 MB Init Duration: 1059.00 ms
Tech details:
- We are using nodejs v12.
- We already tried to reduce the package size and use Layer for the dependencies (didn't help a lot)
- The lambda itself is just querying some data form DyanmoDB, parse it, and retrieve to our users
Any suggestion to improve the latency? Any workarounds?
There are a couple methods for solving cold start issues in Lambda functions:
Good luck!