Debugging Functions
Explore methods for debugging AWS Lambda functions in a local environment using SAM CLI, including generating test events and step-through debugging for supported runtimes. Understand how to use tools like IDEs and Chrome DevTools to simulate events, diagnose issues quickly, and improve development workflows without deploying to AWS.
We'll cover the following...
Because Lambda functions run on an auto-scaling architecture and users don’t really control how many instances run at any given time, it’s not possible to debug them remotely. However, because of the transient nature of Lambda functions, it’s relatively easy to debug functions locally. You can capture remote events, for example from logs, as in the previous section and replay them in a local environment. SAM command line tools can also generate test events for popular services, so you do not have to capture them from logs. For more information, ...