I'd like to debug a set of lambda functions started using the following SAM CLI command:
`sam local start-lambda -t <TEMPLATE_FILE>`
This starts a bunch of lambda functions and prints to the console:
Starting the Local Lambda Service. You can now invoke your Lambda Functions defined in your template through the endpoint.
Running on http://127.0.0.1:3001/
It's also possible to start the container in debug mode using the `-d` flag: `sam local start-lambda -d 5678 -t <TEMPLATE_FILE>`. But when I use "Attach to Node.js" in Run/Debug Configuration to debug, I can't connect to localhost:5678.
Has anyone managed to start the lambda functions with the command above and then attach to the container to debug them? I can debug a particular lambda locally using AWS Toolkit plugin, which invokes (as opposed to starting) the lambda. But it doesn't seem possible to start lambdas using AWS Toolkit.
I'm on MacOS (Apple Silicon).
P. S.: Unfortunately, this discussion didn't help much.