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

helpful-continent-74245

11/08/2018, 5:12 AM
CallbackFunction
is the one that have the logic to use directly the javascript function
l

lemon-spoon-91807

11/08/2018, 5:12 AM
Yup!
CallbackFunction just inherits from aws.lambda.Function
the latter is the most 'raw' resource, where you control everything, and it maps directly to make an aws Lambda.
The former is our 'bridge' subclass
it allows you to pass along a javascript function, and takes care of many things for you
when yoy call
bucket.onEvent(..., () => { }, ... )
then that just ends up calling into
new CallbackFunction
later on, passing along that javascript function.
but you can just instantiate it yourself to control things more.
I'm out for the night. if you have more questions, let me know and i'll try to get back first thing tomorrow!