You can invoke your Lambda function locally by using the sam local invoke command and providing its function logical ID and an event file. We have built a framework using AWS SAM SDK and Pytest to test our Lambda functions before every production deployment. The tests are run inside the Jenkins server itself. No dependency on real AWS account.

Read more here:

I’ll update the post with more information very soon.