source/cfn-init-clustered-video-stream/cfn-init-clustered-video-stream.py [40:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if "ClusteredVideoStreamName" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'ClusteredVideoStreamName'")
    if "MasterPlaylistDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'MasterPlaylistDistributionId'")
    if "RegionOneCloudfrontDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionOneCloudfrontDistributionId'")
    if "RegionTwoCloudfrontDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionTwoCloudfrontDistributionId'")
    if "RegionOne" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionOne'")
    if "RegionTwo" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionTwo'")   

    try:
        # Create state table entries for each region in the clustered video stream

        # Region One
        response = cloudfront_client.get_distribution(Id=event["ResourceProperties"]["RegionOneCloudfrontDistributionId"])

        config = response["Distribution"]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



source/cfn-init-clustered-video-stream/cfn-init-clustered-video-stream.py [136:155]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if "ClusteredVideoStreamName" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'ClusteredVideoStreamName'")
    if "MasterPlaylistDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'MasterPlaylistDistributionId'")
    if "RegionOneCloudfrontDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionOneCloudfrontDistributionId'")
    if "RegionTwoCloudfrontDistributionId" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionTwoCloudfrontDistributionId'")
    if "RegionOne" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionOne'")
    if "RegionTwo" not in event["ResourceProperties"]:
        raise ValueError("Missing property 'RegionTwo'") 

    # Delete the associated the origin group from the master playlist distributionn
    try:

        # Delete RegionOne domain
        response = cloudfront_client.get_distribution(Id=event["ResourceProperties"]["RegionOneCloudfrontDistributionId"])

        config = response["Distribution"]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



