# 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.

##### Post Metadata
- Posted at: about 6 years ago
- Author title: Senior Java Developer 



## Comments
### Comment 1

Yes, sometimes the lambda needs time to warm up if it has not been active for some time. This can be fixed by what&#39;s called &#39;provisioned concurrency&#39; which you can enable by reading about it here: https://aws.amazon.com/blogs/aws/new-provisioned-concurrency-for-lambda-functions/

##### Comment Metadata
- Posted at: almost 5 years ago
- Author title: CTO




## Related Product
[AWS AppSync](https://www.g2.com/products/aws-appsync/reviews)

## Related Category
[API Development](https://www.g2.com/categories/api-development)

## Related discussions
- [How well does Trello scale into a larger team?](https://www.g2.com/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: about 13 years ago
  - Comments: 6
- [Can we please add a new section](https://www.g2.com/discussions/2-can-we-please-add-a-new-section)
  - Posted at: about 13 years ago
  - Comments: 0
- [Quantifiable benefits from implementing your CRM](https://www.g2.com/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: about 13 years ago
  - Comments: 4


