:wave: Hello, team! Evaluating Pulumi for a largel...
# aws
👋 Hello, team! Evaluating Pulumi for a largely serverless organization that has had some issues with SAM. In the context of Pulumi, I'm running into issues installing dependencies in python. Is there are pattern to do this with Pulumi? AWS Lambda documentation is recommending essentially vendoring the packages at the root of the codebase. I still find it strange that Lambda doesn't manage dependencies at all. If anyone has recommendations on how to handle this (as long as layers) I'd be very interested!
That's correct - you have to vendor deps under
for a Python Lambda. Some ideas: 1. Use something like Make or https://taskfile.dev/ to vendor your deps before running Pulumi. (This is what I did when I did worked with Lambdas in TF.) 2. Try the pulumi-command provider (https://www.pulumi.com/registry/packages/command/) to run your
pip install
command. Layers are "eh" in my (non-expert, would defer to someone who has done a ton of Lambda development work) opinion. If you have stable dependencies in multiple Lambdas they can be good and will save time in your development feedback cycle, but if they change often, they can become a headache. I'd suggest not using layers until you're sure that your deps are stable and used in multiple places, and then consider Layers.
Thanks Josh that’s helpful. I did use the command package to do this but coming from a container based world it seems that vendoring is a bit of a step back. Thanks for confirming my assumptions!
👍 1