- Serverless works well with a microservice-style architecture. You should limit the scope of services and functions you use.
- Lambda functions shouldn’t persist any data or session information in the environment beyond the lifetime of a single request.
- However, Lambda might reuse your function instances to make performance optimizations. So, you should optimise for your functions for reuse.
- Cold starts are a problem with AWS Lambda. Reduce latency by keeping containers warm.
- Use dependency injection to make your functions easily testable. Write integration tests, both locally and on deployments.
Full post here, 6 mins read