Skip to content

Adding in functionality to remove objects when they're removed from source bucket#8

Open
nkitmitto wants to merge 2 commits intoeleven41:masterfrom
nkitmitto:master
Open

Adding in functionality to remove objects when they're removed from source bucket#8
nkitmitto wants to merge 2 commits intoeleven41:masterfrom
nkitmitto:master

Conversation

@nkitmitto
Copy link

Adding in functionality to remove objects when they're removed from source bucket

Copy link
Contributor

@mwhouser mwhouser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes required.

However, this change also needs to be "opt-in" using a bucket tag (like the target bucket). The reason being that existing users don't have objects being deleted. If someone updates their Lambda function, then they need to explicitly decide they want the new functionality.

console.log(record);

console.log(eventName);
if (eventName == "ObjectRemoved:DeleteMarkerCreated") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about non-versioned S3 buckets? Is this same event triggered or is it different?

callback();
}
});
if (eventName == "ObjectCreated:Put") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be else if.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants