fresh-solstice-91936
12/14/2021, 11:33 PMconst testLambda = new aws.lambda.Function("testLambda", {
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./handler"),
}),
role: iamForLambda.arn,
handler: "handler.handler",
runtime: "nodejs14.x",
environment: {
variables: {
foo: "bar",
},
},
});
handler/handler.ts:
export const handler = () => {
console.log("meow");
}
this fails with:
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'handler'\nRequire stack:\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
I'm sure I'm just referencing the handler wrong, but I've tried a few different things and can't figure it out lol.green-stone-37839
12/14/2021, 11:36 PM./handler
?fresh-solstice-91936
12/14/2021, 11:40 PMgreen-stone-37839
12/14/2021, 11:46 PMfresh-solstice-91936
12/14/2021, 11:56 PM