https://pulumi.com logo
#python
Title
# python
e

eager-jordan-39489

02/25/2022, 2:09 AM
Hi team, I'm trying to deploy a Lambda that should be triggered by an object creation in an S3 bucket. My stack is working on AWS, and so far it has been coded in Python. I've seen this post https://www.pulumi.com/docs/guides/crosswalk/aws/lambda/, is there any analogy for 
onObjectCreated
 in Python? I couldn't find it..
c

curved-pencil-86122

02/25/2022, 6:11 AM
I haven't found magic function like that. So our solution was longer as BucketNotfication has to be used s3.BucketNotification("bucket-notification", bucket=my_bucket.id, lambda_functions=[ s3.BucketNotificationLambdaFunctionArgs( lambda_function_arn=self.my_lambda.arn, events=["s3ObjectCreated*"] ) ] )
e

eager-jordan-39489

02/25/2022, 7:39 PM
this sounds like a nice turnaround.. I'll test it.. thanks so much