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

jolly-egg-4894

07/16/2019, 12:37 PM
Is it possible to set the runtime of my
.onObjectCreated()
lambda (in typescript) to
nodejs10.x
or am I looking at completely recreating the
BucketEventSubscription
class? I’ve looked at the options that are passed through to the handler but it’s just
{ parent: this }
w

white-balloon-205

07/16/2019, 1:52 PM
You can create a
CallbackFunction
object, and pass that to
onObjectCrrated
. The former allows configuring any Lambda function settings, but also passing a callback as the code to execute.
j

jolly-egg-4894

07/16/2019, 3:38 PM
Ok cool, I’ll give it a crack. Also what method does pulumi use to (tree shake? and) work out what libraries to bring over to the lambda function?
w

white-balloon-205

07/16/2019, 4:42 PM
Some details in here: https://www.pulumi.com/docs/reference/serializing-functions/#determining-the-appropriate-node-modules-packages-to-include-with-a-lambda Any questions beyond that -let us know here or in #docs so we can address.