Unlike unit testing, which tests a unit of the system, integration testing focuses on testing the Lambda function as a whole. So, how do we test Lambda functions in a local development environment without deploying them to AWS? Read on to find out more.
Integration testing
RPC communications
If you read the code under the hood of the official Go library for AWS Lambda (https://github.com/aws/aws-lambda-go), you will notice that Go-based Lambda functions are invoked using net/rpc over TCP. Every Go Lambda function starts a server on a port defined by the _LAMBDA_SERVER_PORT environment variable and waits for incoming requests. To interact with the function, two RPC methods are used:
- Ping: Used to check whether the function...