I'm using the AWS Lambda Function in the Amazon AWS Online-Builder.
I'm using nodejs 6.10. and I want to require the reuest module with var test = require("request")
. But the response is: "errorMessage": "Cannot find module 'request'",
I'm also including the module http with var http = require('http');
and this works. Anyone an idea, why I cannot require "request
"? THANKS!
To troubleshoot Lambda code errors You can use CloudWatch to view all logs generated by your function's code and identify potential issues. For more information, see Accessing Amazon CloudWatch Logs for AWS Lambda.
The default concurrency limit per AWS Region is 1,000 invocations at any given time. The default burst concurrency quota per Region is between 500 and 3,000, which varies per Region. There is no maximum concurrency limit for Lambda functions.
Q: What is AWS Lambda? AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration.
You need to have add a dependency for the request module in your package.json file. Something like:
"dependencies": { "request": "2.88.0" }
There is a good description of how to add node modules to a function at https://github.com/serverless/serverless/issues/948
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With