lambda-warmer
lambda-warmer copied to clipboard
TypeError: lambda.invoke(...).promise is not a function
Hello,
I followed the tutorial and added the code (via the callback technique) to my existing lambda function.
I created a test event on the lambda with the following event object:
{ "warmer":true,"concurrency":3 }
When i executed the test, it failed with the following error traced on Cloudwatch:
TypeError: lambda.invoke(...).promise is not a function
at module.exports (/var/task/node_modules/lambda-warmer/index.js:94:48)
When i changed the concurrecy value to 1, it worked fine and returned "warmer" as the callback message (based on the default tutorial example). And i am assuming this is because we just return a Promise.resolve(true) when the concurrency is 1.
I read about this error in other posts and some people mentioned setting the API version for the SDK. But looking at nobody else had this issue, I am wondering I might have made a very obvious blunder and would appreciate some guidance regarding this.
Thanks!
Hi @aljanson. What version of the SDK are you using?
Hey @jeremydaly
Had a look at the package.json, it shows: "aws-sdk": "2.2.48"