Open justinmk3 opened 2 years ago
This would be amazing. We wait over two minutes every time we invoke a function because the cache is wiped out. Super frustrating when trying to develop.
@justinmk3 Regarding JetBrains, we experience the same problem.
The next release (1.30.0) will include a way to set a directory via a buildDir
field in the launch config (under "sam")
Example config:
"type": "aws-sam",
"request": "direct-invoke",
"name": "lambda-go1.x:HelloWorldFunction (go1.x)",
"invokeTarget": {
"target": "template",
"templatePath": "${workspaceFolder}/lambda-go1.x/template.yaml",
"logicalId": "HelloWorldFunction"
},
"lambda": {
"payload": {},
"environmentVariables": {},
"runtime": "go1.x"
},
"sam": {
"buildDir": "${workspaceFolder}/buildDir"
}
https://github.com/aws/aws-toolkit-vscode/pull/2755 mitigates some issues with the temporary directory by setting the process working directory.
Problem
Toolkit currently always builds and runs from a temporary
/tmp/vstck-xx
directory. This confuses tooling and may defeat SAM CLI "cache" functionality.1988
2024
Reason for the temporary directory:
Related notes:
template.yaml
to a temporary counterpart.1159
990
Proposal
.git/info/excludes
?.aws-sam/
directory?sam
invocations outside of the ToolkitAlternative:
/tmp/vstck-xx
directory for the sametemplate.yaml
Alternative:
--build-dir
correctly? Maybe this will avoid needing to remap the paths in the temporary template.yaml #1159 #990 ?