ServerlessLife / lambda-live-debugger

Remote debugging AWS Lambda functions
https://www.lldebugger.com/
Mozilla Public License 2.0
35 stars 3 forks source link

Support samconfig.yaml #47

Closed eliasbrange closed 2 months ago

eliasbrange commented 2 months ago

SAM has support to have both samconfig.toml or samconfig.yaml.

Looking at the code it seems like lambda-live-debugger only looks for samconfig.toml and fails otherwise.

markostru commented 2 months ago

Thank you for reporting the issue.

eliasbrange commented 2 months ago

While we're at it. At times, you could have multiple templates or use a different naming convention. All SAM commands allow you to specify the template path. So perhaps allow the user to configure it using a --sam-template parameter or similar.

ServerlessLife commented 2 months ago

Thank you very much for the tip.

ServerlessLife commented 2 months ago

@eliasbrange I stumbled upon a very weird bug that is not related to Lambda Live Debugger.

If I specify cli parameter ˙--template-file template.yaml˙, the TypeScript code is not transpiled. Note that the template.yaml is the default file name.

I will keep digging.

ServerlessLife commented 2 months ago

Found the the reason & solution https://github.com/aws/aws-sam-cli/issues/3536#issuecomment-1233156803

ServerlessLife commented 2 months ago

Done.

samconnfig can now be in yaml format.

There are two new parameters for specifying config and template file:

 --sam-config-file <file>        SAM configuration file
 --sam-template-file <file>      SAM template file