Skip to content

Lambda Function doesn't support pulumi assets #124

@pierskarsenbarg

Description

@pierskarsenbarg

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions