Introducing SAM Local

Testing and Debugging present a unique set of challenges in serverless applications. Firstly, serverless means that you don’t have to manage any servers. The underlying infrastructure is abstracted away from you and is managed by AWS. So how do you make sure that the code that runs successfully in the dev environment will actually run successfully in Lambda as well. Ideally, we need to test in an environment that resembles Lambda in terms of the OS, libraries, and runtime. Additionally, it would be great if the limits (memory, timeout) could be enforced locally. Also, mimic responses and logs locally. Lastly, it would be great to generate test events that are syntactically accurate and different for each trigger. This ...

Get Learning AWS - Second Edition 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.