https://pulumi.com logo
#aws
Title
# aws
a

alert-raincoat-81485

01/13/2021, 11:20 PM
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

gentle-diamond-70147

01/14/2021, 7:27 AM
There is not one built in for Python, but you can achieve the same thing by creating your own
BucketNotification
and
LambdaFunction
resources.