How can I gracefully handle response errors through AWS Application Load Balancer?


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,, with node to return a correct response object using the async await syntax.

Some information about my current setup:
node: v8.10.0
serverless: 1.43.0
serverless-domain-manager: ^3.2.2
serverless-plugin-tracing: 2.0.0
serverless-webpack: 5.2.0

Thank you