Open L4B0MB4 opened 2 years ago
Instead of using the go emulation image, provided runtime will pull the provided lambda emulation image which does not support debugging. We currently don't have plans on supporting this. Tagging it as a feature request.
I'd also like to see this feature implemented. Its very annoying that there is no way to debug a Go Lambda locally at the moment.
Developing on a mac and generally working on ARM lambdas, not being able to debug is certainly a problem!
Any update on this issue
Any update on this issue??
We use lambdas behind API Gateway, and use gin proxy. In order for us to debug our SAM functions in al2 runtime, we've implemented an abstraction that determines if running in AWS - if so, we call lambda.Start
with gin proxy, if not, we call a localStart
function that starts gin directly.
I'm not aware of any alternatives, but this at least allows us to debug a single function.
@mcblair could you share a sample repository with an hello world lambda that are you able to debug in local in GoLand or VScode in an M1 Mac please?
@sbilello Sure, just whipped this up: https://github.com/mcblair/aws-hello-go-lambda
It compiles, I have step-through debugged it in VS Code, on my M1 Mac with arm64. Can sam build and deploy it, too.
@mcblair Thank you! It should be worth a blog post! I noticed it works nicely on VScode but unfortunately GoLand does not support provided.al2
@mcblair Thank you! It should be worth a blog post! I noticed it works nicely on VScode but unfortunately GoLand does not support
provided.al2
The AWS toolkit & SAM doesn't support provided.al2
for debugging lambdas. To debug that way, go1.x
is required and you must debug from an x86_64
machine, M1 macs(or any arm
chip) will not work (see https://github.com/aws/aws-sam-cli/discussions/4706).
I was debugging main
with F5 in VS Code and stepping through. Debugging in GoLand should work the same way, as it isn't using AWS toolkit or SAM to even be aware of the function runtime.
Are there any plans on supporting debugging on al2
in the future? Since aws is no longer going to support go1.x
we are going to have to create all of our new functions with al2
and having the ability to debug would be nice to say the least.
Bump
Bump
When developing a go lambda including a external extension one has to switch to provided.al2. If you want to debug the lambda with
it only works until it builds the docker image.
How are we not supposed to debug this ?
Also (as a side note) I could have sworn it worked at one point. But after multiple colleagues had this problem I found myself unable to reproduce a working debugger as well - so it might be my dementia.
Any plans on supporting this in the (near) future ?