DynamoDB Trigger Lambda Function PROBLEM: Function call failed
I enabled streams on my dynamoDB table. As items are modified, a lambda function is triggered. I think I set up everything correctly both on the lambda trigger side, permissions, and dynamodb side. I also ran my lambda function with test data and it succeeded. However, when items are modified in the table, the trigger did not start my lambda function. Instead, I got the following error:
Batch size: 100 Last processing result: PROBLEM: Function call failed
Any idea what's the best way to debug this? I went on CloudWatch logs but there were no logs associated with the trigger/stream.
Thanks.
Edit: Logs for the lambda function (not its dynamodb trigger). The trigger didn't generate any log statements.
START RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Version: $LATEST
18:16:28
END RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67
18:16:28
REPORT RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Duration: 81.85 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 30 MB
amazon-web-services aws-lambda amazon-dynamodb
|
show 5 more comments
I enabled streams on my dynamoDB table. As items are modified, a lambda function is triggered. I think I set up everything correctly both on the lambda trigger side, permissions, and dynamodb side. I also ran my lambda function with test data and it succeeded. However, when items are modified in the table, the trigger did not start my lambda function. Instead, I got the following error:
Batch size: 100 Last processing result: PROBLEM: Function call failed
Any idea what's the best way to debug this? I went on CloudWatch logs but there were no logs associated with the trigger/stream.
Thanks.
Edit: Logs for the lambda function (not its dynamodb trigger). The trigger didn't generate any log statements.
START RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Version: $LATEST
18:16:28
END RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67
18:16:28
REPORT RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Duration: 81.85 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 30 MB
amazon-web-services aws-lambda amazon-dynamodb
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
1
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05
|
show 5 more comments
I enabled streams on my dynamoDB table. As items are modified, a lambda function is triggered. I think I set up everything correctly both on the lambda trigger side, permissions, and dynamodb side. I also ran my lambda function with test data and it succeeded. However, when items are modified in the table, the trigger did not start my lambda function. Instead, I got the following error:
Batch size: 100 Last processing result: PROBLEM: Function call failed
Any idea what's the best way to debug this? I went on CloudWatch logs but there were no logs associated with the trigger/stream.
Thanks.
Edit: Logs for the lambda function (not its dynamodb trigger). The trigger didn't generate any log statements.
START RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Version: $LATEST
18:16:28
END RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67
18:16:28
REPORT RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Duration: 81.85 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 30 MB
amazon-web-services aws-lambda amazon-dynamodb
I enabled streams on my dynamoDB table. As items are modified, a lambda function is triggered. I think I set up everything correctly both on the lambda trigger side, permissions, and dynamodb side. I also ran my lambda function with test data and it succeeded. However, when items are modified in the table, the trigger did not start my lambda function. Instead, I got the following error:
Batch size: 100 Last processing result: PROBLEM: Function call failed
Any idea what's the best way to debug this? I went on CloudWatch logs but there were no logs associated with the trigger/stream.
Thanks.
Edit: Logs for the lambda function (not its dynamodb trigger). The trigger didn't generate any log statements.
START RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Version: $LATEST
18:16:28
END RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67
18:16:28
REPORT RequestId: 3a08eedc-f0de-11e8-9008-033b48d2cb67 Duration: 81.85 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 30 MB
amazon-web-services aws-lambda amazon-dynamodb
amazon-web-services aws-lambda amazon-dynamodb
edited Nov 26 '18 at 2:00
Sarah Guo
asked Nov 23 '18 at 18:12
Sarah GuoSarah Guo
518
518
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
1
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05
|
show 5 more comments
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
1
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
1
1
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05
|
show 5 more comments
1 Answer
1
active
oldest
votes
This sounds like a possible use-case for Rookout if you need to follow variable values in your live Lambda in a situation where you're not able to generate logs and running it locally isn't going to give you real-world event trigger data.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53451311%2fdynamodb-trigger-lambda-function-problem-function-call-failed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This sounds like a possible use-case for Rookout if you need to follow variable values in your live Lambda in a situation where you're not able to generate logs and running it locally isn't going to give you real-world event trigger data.
add a comment |
This sounds like a possible use-case for Rookout if you need to follow variable values in your live Lambda in a situation where you're not able to generate logs and running it locally isn't going to give you real-world event trigger data.
add a comment |
This sounds like a possible use-case for Rookout if you need to follow variable values in your live Lambda in a situation where you're not able to generate logs and running it locally isn't going to give you real-world event trigger data.
This sounds like a possible use-case for Rookout if you need to follow variable values in your live Lambda in a situation where you're not able to generate logs and running it locally isn't going to give you real-world event trigger data.
answered Nov 29 '18 at 14:05
Arieh KovlerArieh Kovler
594
594
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53451311%2fdynamodb-trigger-lambda-function-problem-function-call-failed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Q1: where did you see the "Batch size: 100 Last processing result: PROBLEM: Function call failed" ? Q2: what does "no logs associated with the trigger/stream." mean? where there any logs at all for the lambda (even though not related to the trigger/stream)? If there were, can you post them? Q3: Is this lambda invoked by a different event source? Q4 :How much RAM is allocated for that lambda?
– Itay Maman
Nov 24 '18 at 20:03
Q1: I saw this msg when I click on the dynamodb trigger in the lambda console. Q2: Actually I don't think I set up logs with the trigger. How do you set up logs for the trigger? Thanks.
– Sarah Guo
Nov 25 '18 at 17:57
@ItayMaman, I updated the post with the log statements. The ram is 128 MB.
– Sarah Guo
Nov 26 '18 at 2:01
can you share the code of the lambda?
– Itay Maman
Nov 27 '18 at 3:00
1
I think the issue has to do with the while loops and the batchgetitems and scans. I considered either doing recursion like you said or using async/await. But for the former I don't know if recursion stack will trigger other problems. And for the latter, it feels really unintuitive. Another issue is aws.documentClient in node.js uses callbacks instead of promises. So for the sake of simplicity I am switching to Java. Java and Python don't have the async issues that's in javascript/node.js.
– Sarah Guo
Nov 27 '18 at 23:05