Charles Zhang
06/02/2021, 6:52 AMsrc
folder simply, it will be missing in the final lambda folder. Every know how to solve this problem??Mr.9715
06/02/2021, 10:00 AMconst file = require('YOUR_FILE_PATH');
Frank
Mr.9715
06/02/2021, 4:17 PMFrank
bundle.copyFiles
props:
new sst.Function(this, "MyLambda", {
bundle: {
copyFiles: [{ from: "path/to/binary/file", to: "." }],
},
handler: "src/lambda.main",
});
This will copy the binary file
to the Lambda package.Charles Zhang
06/08/2021, 3:24 PMbundle.copyFiles
and it works great. But the folder path is different between local and lambda environments, and the static file cannot be copied in LOCAL mode, so I use IS_LOCAL
parameter to identify what path should I use.Frank