Serverless development can speed up your development process a lot by moving infrastructure responsibilities over to cloud providers. However, when testing your application, it can be a challenge to mimic all the cloud services you’re relying on.
One useful tool to help do this when you’re writing Python code is
moto. In this post, I’ll show you how to use the
moto module in combination with
pytest to help test your Python code when it interacts with AWS services like DynamoDB, S3 and others.