Search⌘ K
AI Features

Debugging Functions

Explore techniques to debug AWS Lambda functions locally by replaying events, using SAM CLI for local invocation, and integrating with IDEs and debugging tools. Learn how to set up debug sessions for supported runtimes and handle the development workflow efficiently before deployment.

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, check out the section Generating test events in Chapter 9.

Environment

...