So, I’m successfully invoking my lambda function through AWS Application Load Balancer, and my API client is receiving the expected response code.
However, my dashboard shows every invocation as successful. So if my lambda returns a 500 response, my AWS dashboard will display this as a success. This is problematic because this and cloudwatch logs have been my primary source of debugging and error communication.
I’d like to both return a 500 response as well as have my dashboard display a proper Error Count.
I’ve followed the documentation here, https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html, with node to return a correct response object using the async await syntax.
Some information about my current setup: