Reputation: 161
I'm experimenting with dynamo db and lambda and am having trouble with the following flow:
Lambda A is triggered by a put to S3 event. It takes the object, an audio file, calculates its duration and writes a record in dynamoDB for each 30 second segment.
Lambda B is triggered by dynamoDB, downloads the file from S3 and operates on the 30 second record defined in the dynamo row.
My trouble is that when I run this flow, function A writes all of the rows required to dynamo, by function B
Configuration
Things I've confirmed
Has anyone had similar issues? Any idea what to check next? Thanks
Upvotes: 5
Views: 9513
Reputation: 129
I was also encountering similar problem where dynamoDB trigger is either not triggered or it was triggered with OLD image.
Go to lambda console configuration tab > Triggers
I found it says "Last processing result: PROBLEM: Function call failed". I then realized it is because the prior lambda trigger execution was NOT successful, which leads it keeps using OLD image to retry and retry but it just keeps failing.
In the end I found the failing reason is because, the lambda timeout time is set to 25 second, so it keeps failing due to timeout (my lambda contains lots of long-waiting async logic, so it takes long time to execute)
Go to Lambda console > General configuration Info tab > change the timeout period to 5min, it solves the problem :)
Upvotes: 0
Reputation: 2046
I had the same problem, the solution was to create a VERSION from the Lambda and NOT to use the $LATEST
Version, but a 'fixed' one.
It is not possible to use the latest ever-changing version to build a trigger upon.
Place to do that: Lambda / Functions / YourLambdaName / Qualifiers Dropdown on the page / Switch versions/aliases / Version Tab -> check that you have a version
If not -> Actions / Publish new version
Upvotes: 5