Manually testing your functions with the AWS Management Console

We are definitely not new towards testing the functions manually using the AWS Management Console. Let us have a quick look at it once again before we go any further:

  1. To test any of your functions manually, all you need to do is select the Configure test event option from the Actions drop-down list of your Lambda function. In this case, I'm using my trusty Calculator code example for this exercise (version: 2, alias: PROD).
  2. In the Input test event dialog box, provide the test event as shown in the following screenshot. Remember, you can use either of these values as the operand variable: +, -, /, *, add, sub, mul, div.
  3. Once you have provided the sample event, click on Save and test:

If all goes well, you should see the output of your function's execution in the Execution result area. Similarly, you can use the Configure test event option to simulate a variety of test events for your Lambda function ranging from simulated SNS messages to commits made to your repo in AWS CodeCommit and so on. This however, can become a very tedious and time consuming effort, especially when you have to develop various versions of the code, test it, run the code, and again repeat the entire cycle all over again. Fortunately for us, there are a few easier ways to test your functions even before you actually deploy them to Lambda. Let us take a look at how we can achieve this.