I am having a SDK which i include in my lambda function. This SDK is responsible for gathering information about the context of lambda function and sends it to my remote server. Below is my sample lambda code
import mymodule
exports.handler = async (event, context, callback) => {
var array = [];
var count = 11000000; //loop to max number just to make sure we hit the limit
// var count = 110000
const str = "This is the memory error, will get the memory error.";
//Start appending array with the string
for (var i = 0; i < count; i++) {
array.push(str);
}
console.log(array);
};
in my SDK code i am capturing lambda_bootstrap by following statement
lambda_bootstap = require.main
this returns me majority of the parameters but dose not return the context any help to get lambda context in my SDK would be great. TIA
callbackparameter. Useasyncorcallback, not both.