In AWS classic, you can do the following:
const lambda = new awsclassic.lambda.Function("lambdaFunction", {
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./app"),
}),
runtime: "nodejs12.x",
role: lambdaRole.arn,
handler: "index.handler",
});
In AWS Native you have to zip up your code first and then point the code.zipFile at the zip file you've created:
const lambdaFunction = new awsnative.lambda.Function("lambdaFunction", {
code: {
zipFile: "./app.zip",
},
runtime: "nodejs12.x",
role: lambdaRole.arn,
handler: "index.handler",
});
Expected: Be able to use the Pulumi Asset resources
In AWS classic, you can do the following:
In AWS Native you have to zip up your code first and then point the
code.zipFileat the zip file you've created:Expected: Be able to use the Pulumi Asset resources