REST call from Lambda often extremely slow
4
I'm not sure if the question is correct here or would better fit on Super User. However since I think I may did something wrong with my code I try it here. I created a small proxy lambda function to invoke my REST API. I'm using node.js and the request package. Here is my code: exports.handler = function (request, context) { require('request').post({url: 'https://example.com/foo/bar', json:request, timeout:1000}, function(error, response, body){ if(error) { console.log("Something went wrong:n" + JSON.stringify(error, null, 2)); context.succeed({failed:true}) } else { console.log("Returning remote response:n" + JSON.stringify(body, null, 2)); context.succeed(body); } }); co...