'SAM template.yaml from VS Code launch.json?

I'm using an AWS SAM debug configuration in VS Code to execute Lambda code for Typescript/Node 14 inside a Docker container. I've run into problems of dependencies not being included in the Lambda image, and I presume that building the Lambda explicitly using sam build should resolve that. However, I can't find the template files that VS Code generates. Is there a way to export my settings from VS Code's launch.json, or otherwise get hold of the template.yaml?



Solution 1:[1]

The SAM template will be generated, at least on Mac, in a directory under /tmp/aws-toolkit-vscode. E.g.:

/tmp/aws-toolkit-vscode/vsctkENG01e/app___vsctk___template.yaml

This directory gets mapped into the Docker container.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Isac Casapu