{
  "Comment": "",
  "StartAt": "Multiplexer",
  "States": {
    "Multiplexer": {
      "Type": "Task",
      "Resource": "arn:aws:lambda:us-east-1:0:function:multiplexer",
      "Next": "ChoiceState"
    },
    "ChoiceState": {
      "Type" : "Choice",
      "Choices": [
        {
          "Variable": "$.result",
          "NumericEquals": 1,
          "Next": "ImageTranscoding"
        },
        {
          "Variable": "$.result",
          "NumericEquals": 2,
          "Next": "AudioTranscoding"
        }
      ],
      "Default": "UnknownType"
    },

    "ImageTranscoding": {
      "Type" : "Task",
      "Resource": "arn:aws:lambda:us-east-1:1:function:image_transcoder",
      "Next": "Notifier"
    },

    "AudioTranscoding": {
      "Type" : "Task",
      "Resource": "arn:aws:lambda:us-east-1:2:function:audio_transcoder",
      "Next": "Notifier"
    },

    "UnknownType": {
      "Type": "Fail",
      "Cause": "No Matches!"
    },

    "Notifier": {
      "Type": "Task",
      "Resource": "arn:aws:lambda:us-east-1:3:function:notifier",
      "End": true
    }
  }
}
