This runs on a lambda function once (triggered by API Gateway).
The majority of times, everything looks fine and the lambda executes very quickly.
However, sometimes the lambda takes between 30-60 seconds to execute. When checking traces in Cloudwatch, I can see there's multiple calls to this Model table, sometimes 50+ requests.
DynamoDB's default timeout is 2 minutes, but I set it to 10 seconds, so in case of failure, it should be retried sooner. But the weirdest thing is that all these requests duration average is around 10-20ms, so it doesn't seem it's failing.
I can't see anything wrong in the code, just wondering if there is something I don't know about dynamodb-data-mapper...
I have this code
This runs on a lambda function once (triggered by API Gateway).
The majority of times, everything looks fine and the lambda executes very quickly.
However, sometimes the lambda takes between 30-60 seconds to execute. When checking traces in Cloudwatch, I can see there's multiple calls to this
Model
table, sometimes 50+ requests.DynamoDB's default timeout is 2 minutes, but I set it to 10 seconds, so in case of failure, it should be retried sooner. But the weirdest thing is that all these requests duration average is around 10-20ms, so it doesn't seem it's failing.
I can't see anything wrong in the code, just wondering if there is something I don't know about dynamodb-data-mapper...