Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: lambda.invoke(...).promise is not a function #3

Open
aljanson opened this issue Mar 19, 2019 · 2 comments
Open

TypeError: lambda.invoke(...).promise is not a function #3

aljanson opened this issue Mar 19, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@aljanson
Copy link

aljanson commented Mar 19, 2019

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!

@jeremydaly
Copy link
Owner

Hi @aljanson. What version of the SDK are you using?

@aljanson
Copy link
Author

Hey @jeremydaly

Had a look at the package.json, it shows: "aws-sdk": "2.2.48"

@naorpeled naorpeled added the bug Something isn't working label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants