https://pulumi.com logo
Title
d

damp-school-17708

04/14/2021, 8:13 AM
One possibly silly question, is the FileArchive on a folder slower than a FileArchive on a zip?
const docsHandlerFunc = new aws.lambda.Function("docsHandlerFunc", {
   // Upload the code for our Lambda from the "./app" directory:
   code: new pulumi.asset.AssetArchive({
      ".": new pulumi.asset.FileArchive("./app"),
   }),
   runtime: "nodejs12.x",
   role: docsHandlerRole.arn,
});
Does Pulumi (or TF behind the scenes) zip the folder for us?
Asking because lambda deploy seems a bit slow. (for example compared to what I used to do with serverless/cloudformation)
thanks
b

brave-planet-10645

04/14/2021, 9:18 AM
So that's how I've always done it and it's been quicker than serverless/cloudformation
We don't run TF behind the scenes, just use the provider schema to map the API calls
👍 1
d

damp-school-17708

04/14/2021, 9:27 AM
@brave-planet-10645 when you say that's how i always done it it's with a folder or with a zip? thanks again
b

brave-planet-10645

04/14/2021, 9:29 AM
As in, whenever I've created a lambda and used code in a folder rather than one of our magic functions then I've done
code: new pulumi.asset.AssetArchive({
      ".": new pulumi.asset.FileArchive("./app"),
   }),
d

damp-school-17708

04/14/2021, 9:32 AM
cool thanks for clarifying