Amazon Simple Email Service
Developer Guide

Part 7: Test the AWS Lambda Function

Before you schedule the Lambda function to run on a regular basis, you should test it to be sure that all of the components are configured properly. In this procedure, you send two messages through the Amazon SES mailbox simulator, and then run the Lambda function to ensure that messages are being processed properly.

To test the Lambda function

  1. Open the Amazon SES console at

  2. In the column on the left, choose either Email Addresses or Domains.

  3. Select a verified email address or domain, and then choose Send a Test Email.

  4. For To:, type For Subject and Body, type some sample text. Choose Send Test Email.

  5. Repeat steps 3 and 4 to create another test message, but this time, for To:, type

  6. Open the Amazon SQS console at The Messages Available column should indicate that 2 messages are available.

  7. Open the Lambda console at

  8. In the navigation bar, choose Functions.

  9. In the list of functions, choose the function you created in Part 6: Create an AWS Lambda Function.

  10. Choose Test. When the function finishes running, expand the Details section. If the Lambda function was configured properly, you will receive one of the following messages:

    • null: Indicates that the function ran without errors.

    • Queue empty: Indicates that there were no new bounce or complaint notifications in the queue.

  11. Proceed to Part 8: Configure Triggers in Amazon CloudWatch.