I want to create a eventbridge rule for triggering aws lambda for every document inserted into opensearch. I need a event pattern for triggering aws lambda based on document insert into opensearch.
I had tried defining the following eventpattern and several other options based on the below template with different syntaxed but nothing is working. I need a event pattern that triggers aws lambda whenever a new document is inserted into aws opensearch.
{
"source": ["aws.es"],
"account": ["081723753071"],
"region": ["us-east-1"],
"resources": ["arn:aws:es:us-east-1:01234563071:domain/cloudwatchevent"],
"detail-type": ["AWS Opensearch document insert events"],
"detail": {
"eventSource": ["es.amazonaws.com"],
"indexName": ["cloudwatch_events"],
"eventName": ["IndexDocument"]
}
}