I am trying to execute Lambda function that has the request module. Unfortunately, it is not firing the request module. Neither does it give any error in the cloudwatch logs.
Request your help, what could be the issue for which this request module is not fired. This works using Postman.
Nodejs Version Used: 8.10
request({
url: 'https://api.amazon.com/user/profile',
headers: {
'Authorization': 'Bearer '+ bearerTok,
'Content-Type': 'application/json'
},
rejectUnauthorized: false
}, function(err, res) {
if(err) {
console.error("Error"+err);
} else {
console.log("Result+"+res.body);
callback( res.body);
}
});
handler?