'Improving connection performance between AWS Lambda and AWS Document DB
We have a service connecting to Document DB through lambda. Right now, we are creating DocDB client object and injecting using google guava. But, we are seeing some latency issue with this approach and curious about below questions related to DocDB and Lambda:
- In the approach of establishing the connection through code, does the connection happen after lambda invocation and before the call to handler method or after the call to handler method? (We are also using provisioned concurrency).
- Is there a better way to keep the connection warm (persistence connection) between Lambda and DocDb, like proxies or anything? I found some resource to do it in JavaScript (ref) but nothing for Lambda in Java.
- We are seeing that after some time (around 5 mins), the DocDB connection and modules are getting cleaned up in Lambda, can we configure the clean-up settings manually?
Thanks,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
