Menu
AWS Lambda
Developer Guide

Step 5: Test the Lambda Function Again

Now test the Lambda function again. This time, update the code by specifying either a non-existing webpage URL or a text string. This causes the function to return an error that AWS Lambda sends to CloudWatch error metrics. CloudWatch posts this message to the Amazon SNS topic and you get an email notification.