1 Answer
- Newest
- Most votes
- Most comments
3
As you are using node.js I think the issue is that the function returns before the function finished updating the database. Once the function returns, the Lambda execution environment is frozen and it will be unfrozen when the next request is received.
You should either update the DB using a synchronous mode, i.e., use await
when updating the DB, or make sure that the context.callbackWaitsForEmptyEventLoop
is set to true
. See more information here.
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago