How can I match a CloudWatch event on a regex. I need to invoke only a particular SNS target on a specific job name. e.g, something like below where I want to do a regex match on TranscriptionJobName. Thanks.
{
"source": [
"aws.transcribe"
],
"detail-type": [
"Transcribe Job State Change"
],
"detail": {
"TranscriptionJobStatus": [
"COMPLETED",
"FAILED"
],
"TranscriptionJobName": [
"transcription-localhost-*"
]
}
}
This is now possible with EventBridge and its ability to do prefix matching. This works for me. I have a Lambda function set up as a target, and the function is executed only upon a Transcribe job reaching COMPLETED
status and having a job name starting with voicemail-
.
{
"source": [
"aws.transcribe"
],
"detail": {
"TranscriptionJobName": [
{
"prefix": "voicemail-"
}
],
"TranscriptionJobStatus": [
"COMPLETED"
]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With