Testing a Lambda function 

To test the Lambda function that we wrote and uploaded in the preceding sections, we have to create a test harness via the Configure Test Event drop-down menu in the header. This test will happen in isolation (think of it as a sandbox mode). We have not wired it up to any of the event sources just yet.

The following screenshots show the process, which can be described as follows:

  1. Select the drop-down menu to configure a new test event:

Initial step
  1. Configure the test events. First, let's configure a positive scenario, where a valid input is given, as follows:
Test event for positive flow is created

A few points ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.