Invoke specified CloudWatch Rule on MediaConvert Event

0

I use AWS Lambda that executes MediaConvert for video transcoding and AWS CloudWatch Events Rule for executing another one AWS Lambda when MediaConvert job status was changed and log changed status in db(e.g. DynamoDb).

We have the following data flow:
Lambda -> MediaConvert -> CloudWatch Event Rule -> Lambda for processing job status -> DynamoDb
So it works fine if I have 1 environment, but when we have 2 or more environments this flow doesn't work.

It seems MediaConvert can execute only 1 CloudWatch Rule Event for 1 Event.
By this reason there is can be a case when you send job to transcoding from the 1st environment, but Lambda for processing job status was executed from the 2nd environment (because CloudWatch Event Rule from the 2nd environment pull MediaConvert Event )

Is there is a way how I can achieve to execute Lambda for processing job status
and CloudWatch Event Rule exactly from the 1st environment

질문됨 5년 전1021회 조회
1개 답변
0

Hi there,

You can also key off userMetadata from the job payload.

The example below would trigger a cloudwatch event based on the following conditions:

Service source is mediaconvert
Job status is COMPLETE
And userMedadata in the job json has key pair of env and Prod.

{
  "source": [
    "aws.mediaconvert"
  ],
  "detail": {
    "status": [
      "COMPLETE"
    ],
    "userMetadata": {
      "env": [
        "Prod"
      ]
    }
  }
}

For more information on Job tagging please see:
https://docs.aws.amazon.com/mediaconvert/latest/ug/tagging-jobs.html​

답변함 5년 전
profile picture
전문가
검토됨 16일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인