Learning about testing locally

Concerning local development, I believe the best strategy is to set up robust and thorough unit tests. Unit-testing serverless applications is no different from testing traditional server-based applications. As long as you follow the mantra of keeping your serverless code separate from your business logic, it's quite simple to get to a very high test coverage.

But what do we do when our application relies on backing services such as databases, caches, and the like? Additionally, what do we do when our serverless application calls other services that don't exist locally, such as AWS, SNS, and so on?

My approach to common systems such as Postgres or Redis is to use Docker. If you look back at the unit tests from ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.