Reputation: 43
looking for some help on this. I read some some examples , but still not sure , if i can directly invoke a glue crawler job via s3 object notification . based on what i read, it looks like i can't.
so far , i have a cloudwatch event rule, that looks for a object creation in s3 bucket. how can i configure following glue crawler to be triggered via my cloudwatch event rule? new to terraform , so some code will help
resource "aws_glue_crawler" "example"{
....
}
resource "aws_cloudwatch_event_rule" "example" {
name = "example-event-rule"
description = "object creation - S3 bucket"
event_pattern = <<PATTERN
{
"detail-type": ["AWS API Call via CloudTrail"],
"source": ["aws.s3"],
"detail": {
"eventSource": ["s3.amazonaws.com"],
"requestParameters": {
"bucketName": ["example-bucket"]
},
"eventName": ["PutObject"]
}
}
PATTERN
}
Upvotes: 0
Views: 224