Pretty sure @bni is on the right track here - it sounds like the response object.
Look at the code you linked, all the errors have
console.error lines before them, so since you're not seeing those errors (and your DDB operation is working) it pretty much has to be the response object format being wrong. Log out the
response object and verify it before you
callback(null, response) line to be sure.