1 Answer
- Newest
- Most votes
- Most comments
0
I understand that you require guidance regarding your use case where the retrieval time of get_document_analysis function while processing documents with larger page sizes long, is much higher than expected.
There are different ways to improve the performance of your function specifially while calling a downstream api endpoint -
- Increasing the memory of your function, which can range between between 128 MB and 10,240 MB. Please note that memory proportionally increases the amount of CPU, increasing the overall computational power available. If a function is CPU-, network- or memory-bound, then changing the memory setting can dramatically improve its performance. You will be able to locate the memory consumption of your function from its CloudWatch invocation logs. You need to monitor the 'Max Memory Used'.
...
REPORT RequestId: 1234abcd-1730-4395-85cb-4f71bd2b87b8 Duration: 79.67 ms Billed Duration: 80 ms Memory Size: 128 MB Max Memory Used: 73 MB
- Using the Static initialization to define the clients to connect any downstream API or Database. The static init code gets executed before the handler code starts running in a function. This is the “INIT” code is often used to import libraries and dependencies, set up configuration and initialize connections to other services.
However, for in-depth troubleshooting, I would request you to create a support case with our Premium Support - Lambda technical team. Please navigate to Support Center and follow the steps as suggested following this link. Please add the code snippet used in your function along with the complete invocation logs with proper timestamp so that assigned engineer can assist you better with all the data at hand.
answered a year ago
Relevant content
- asked 4 years ago
- asked 5 months ago
- asked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago