https://pulumi.com logo
#general
Title
# general
i

icy-controller-6092

04/24/2022, 2:24 AM
How can I combine two folders into a single zip archive for upload to lambda? e.g.
code: FileArchive('./a') + FileArchive('./b')
e

echoing-dinner-19531

04/24/2022, 9:38 AM
I think you want an
AssetArchive
Copy code
let assetArchive = new AssetArchive({
    "a": new FileArchive('./a'),
    "b": new FileArchive("./b"),
});
🙌 1
i

icy-controller-6092

04/24/2022, 10:35 AM
Thanks Fraser, this is for building a lambda layer from two folders so I ended up building 2 lambda layers because you can’t have
"."
as a key twice… But I also might give this a try:
Copy code
new AssetArchive({
  '.': new FileArchive('./a'),
  'x': new FileArchive('./b/x'),
  'y': new FileArchive('./b/y'),
})
3 Views