AWS lambda internal server error 502

If the lambda is calling an external service and it's taking time to respond then increase the timeout of lambda.
default is 3 seconds

Comments