In this chapter, we learned how to write unit tests for the Lambda function to cover all the edge cases of the function. We also learned how to use AWS SAM to set up a local development environment to test and deploy the function locally, in order to ensure its behavior is working as expected before deploying it to AWS Lambda.
In the next chapter, we will cover how to troubleshoot and debug serverless applications using AWS-managed services such as CloudWatch and X-Ray.