
This project contains automated test code samples for serverless applications written in Python. The project demonstrates several techniques for executing tests including mocking, emulation and testing in the cloud. Based on current tooling, we recommend customers focus on testing in the cloud as much as possible.
While testing in the cloud may create additional developer latency, have a cost impact, and require some customers to invest in additional dev-ops controls, this technique provides the most reliable, accurate, and complete test coverage. Performing tests in the cloud allows you to test IAM policies, service configurations, quotas, and the most up-to-date API signatures and return values. Tests run in the cloud are most likely to produce consistent results as you promote your code from environment to environment.
git clone https://github.com/aws-samples/serverless-test-samples
cd serverless-test-samples/python-test-samples/apigw-lambda