```import * as aws from '@pulumi/aws' const bucket...
# aws
a
Copy code
import * as aws from '@pulumi/aws'
const bucket = new aws.s3.Bucket("mybucket");
bucket.onObjectCreated("newObject", async (ev) => {
    console.log(JSON.stringify(ev));
});
export const bucketName = bucket.id;
In this example, the
onObjecyCreated
method is related to the JS, is there any similar method available in Python for logging purpose?
g
There is not one built in for Python, but you can achieve the same thing by creating your own
BucketNotification
and
LambdaFunction
resources.