is there a way to cache values in a lambda by sett...
# aws
b
is there a way to cache values in a lambda by setting global variables with magic functions in Pulumi? Or do I need to resort to packaging lambdas manually?
l
That should work fine in Pulumi. Pulumi just packages the lambda functions / layers and deploys them. You can do everything in that article via Pulumi.
b
@busy-apartment-9626 I'm assuming you want to do something like this: https://gist.github.com/pierskarsenbarg/a7b86d64cb3ccccac7dcbc55deb5caa4 (so have the function or variable that does any heavy lifting and use the Lambda context)? I've tried this, but Pulumi just seems to hang so I raised this ticket: https://github.com/pulumi/pulumi-aws/issues/1433
b
@brave-planet-10645 yup that's pretty much it. I'll keep an eye on the issue, thanks