Best Software for 2025 is now live!
Israel C.
IC
Senior Java Developer

when you do a x-ray to the requests, why is that some times the lambda responds fast or it can take up to 2 seconds ?

in x-ray you can see it does nothing for like 1.5 seconds, this requesting 1 single object from dynamoDB all the time. there is no faster datasource than dynamoDB when you query by id, and this with appsync should be very fast but our tests shows that there is a overhead expected from appsync aggregation but also there is a random amount of inactivity of the lambda that we can't improve. we tried everything, including all possible caches, but it seams it's just lambda not being warm I guess, would like to get more light into this.
1 comment
Looks like you’re not logged in.
Users need to be logged in to answer questions
Log In
Forest K.
FK
0
Yes, sometimes the lambda needs time to warm up if it has not been active for some time. This can be fixed by what's called 'provisioned concurrency' which you can enable by reading about it here: https://aws.amazon.com/blogs/aws/new-provisioned-concurrency-for-lambda-functions/
Looks like you’re not logged in.
Users need to be logged in to write comments
Log In
Reply