I really like the magic lambda feature mentioned h...
# aws
h
I really like the magic lambda feature mentioned here: https://www.pulumi.com/docs/clouds/aws/guides/lambda/ However, it seems when I use it I run on node16. I'd like to run on node20, but then I think I need to create an
aws.lambda.Function
and I think I lose the ability to create a magic lambda then. Is that right? Or can I use a magic lambda with a custom runtime?
l
You can use a resource transformation or stack transformation to change the runtime, but there is no easy or strongly-typed way to do it. Also, magic functions are nice for prototyping and experimenting, but I strongly recommend not using them in production code. They are quintessentially untestable. Worse, files with magic functions in them cannot be loaded by Pulumi's test runtime (or at least, they couldn't be, last time I tried) so they render other code untestable simply by being there.
h
all I need is a lambda to call an HTTP endpoint on a schedule so it seemed perfect. I'll look into resource transformations