Can anyone tell me why this methodology works locally but will not work in an AWS Lambda. Took us 2 days to figure out it was the request format. It is copied straight from Chargebee examples. I am a novice in Node.
await chargebee.customer.retrieve(customer_id).request(function(error,result) {
if(error){
//handle error
console.log(error);
}else{
console.log(result);
var customer = result.customer;
var card = result.card;
}
});
But this method works fine in Lambda
var response = await chargebee.customer.retrieve(customer_id).request();
Using Node 16
I have no idea why it would execute differently unless AWS's Node 16 is different from the 16.13.0 we are using locally?