{
  "Description": "(SO0021) - Video on Demand on AWS workflow with AWS Step Functions, MediaConvert, MediaPackage, S3, CloudFront and DynamoDB. Version v6.1.14",
  "Metadata": {
    "AWS::CloudFormation::Interface": {
      "ParameterGroups": [
        {
          "Label": {
            "default": "Workflow"
          },
          "Parameters": [
            "AdminEmail",
            "WorkflowTrigger",
            "Glacier",
            "EnableSns",
            "EnableSqs"
          ]
        },
        {
          "Label": {
            "default": "AWS Elemental MediaConvert"
          },
          "Parameters": [
            "FrameCapture",
            "AcceleratedTranscoding"
          ]
        },
        {
          "Label": {
            "default": "AWS Elemental MediaPackage"
          },
          "Parameters": [
            "EnableMediaPackage"
          ]
        }
      ],
      "ParameterLabels": {
        "AdminEmail": {
          "default": "Notification email address"
        },
        "Glacier": {
          "default": "Archive source content"
        },
        "WorkflowTrigger": {
          "default": "Workflow trigger"
        },
        "FrameCapture": {
          "default": "Enable Frame Capture"
        },
        "EnableMediaPackage": {
          "default": "Enable MediaPackage"
        },
        "AcceleratedTranscoding": {
          "default": "Accelerated Transcoding"
        },
        "EnableSns": {
          "default": "Enable SNS Notifications"
        },
        "EnableSqs": {
          "default": "Enable SQS Messaging"
        }
      }
    }
  },
  "Parameters": {
    "AdminEmail": {
      "Type": "String",
      "AllowedPattern": "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$",
      "Description": "Email address for SNS notifications (subscribed users will receive ingest, publishing, and error notifications)"
    },
    "WorkflowTrigger": {
      "Type": "String",
      "Default": "VideoFile",
      "AllowedValues": [
        "VideoFile",
        "MetadataFile"
      ],
      "Description": "How the workflow will be triggered (source video upload to S3 or source metadata file upload)"
    },
    "Glacier": {
      "Type": "String",
      "Default": "DISABLED",
      "AllowedValues": [
        "DISABLED",
        "GLACIER",
        "DEEP_ARCHIVE"
      ],
      "Description": "If enabled, source assets will be tagged for archiving to Glacier or Glacier Deep Archive once the workflow is complete"
    },
    "FrameCapture": {
      "Type": "String",
      "Default": "No",
      "AllowedValues": [
        "Yes",
        "No"
      ],
      "Description": "If enabled, frame capture is added to the job submitted to MediaConvert"
    },
    "EnableMediaPackage": {
      "Type": "String",
      "Default": "No",
      "AllowedValues": [
        "Yes",
        "No"
      ],
      "Description": "If enabled, MediaPackage VOD will be included in the workflow"
    },
    "EnableSns": {
      "Type": "String",
      "Default": "Yes",
      "AllowedValues": [
        "Yes",
        "No"
      ],
      "Description": "Enable Ingest and Publish email notifications, error messages are not affected by this parameter."
    },
    "EnableSqs": {
      "Type": "String",
      "Default": "Yes",
      "AllowedValues": [
        "Yes",
        "No"
      ],
      "Description": "Publish the workflow results to an SQS queue to injest upstream"
    },
    "AcceleratedTranscoding": {
      "Type": "String",
      "Default": "PREFERRED",
      "AllowedValues": [
        "ENABLED",
        "DISABLED",
        "PREFERRED"
      ],
      "Description": "Enable accelerated transcoding in AWS Elemental MediaConvert. PREFERRED will only use acceleration if the input files is supported. ENABLED accleration is applied to all files (this will fail for unsupported file types) see MediaConvert Documentation for more detail https://docs.aws.amazon.com/mediaconvert/latest/ug/accelerated-transcoding.html"
    }
  },
  "Mappings": {
    "AnonymizedData": {
      "SendAnonymizedData": {
        "Data": "Yes"
      }
    }
  },
  "Conditions": {
    "EnableMediaPackageCondition": {
      "Fn::Equals": [
        {
          "Ref": "EnableMediaPackage"
        },
        "Yes"
      ]
    },
    "FrameCaptureCondition": {
      "Fn::Equals": [
        {
          "Ref": "FrameCapture"
        },
        "Yes"
      ]
    },
    "EnableSnsCondition": {
      "Fn::Equals": [
        {
          "Ref": "EnableSns"
        },
        "Yes"
      ]
    },
    "EnableSqsCondition": {
      "Fn::Equals": [
        {
          "Ref": "EnableSqs"
        },
        "Yes"
      ]
    },
    "CDKMetadataAvailable": {
      "Fn::Or": [
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "af-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-3"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-south-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-3"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-4"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ca-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ca-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-northwest-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-central-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-south-2"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-3"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "il-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "me-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "me-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "sa-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-west-1"
              ]
            }
          ]
        },
        {
          "Fn::Equals": [
            {
              "Ref": "AWS::Region"
            },
            "us-west-2"
          ]
        }
      ]
    }
  },
  "Resources": {
    "Logs6819BB44": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketEncryption": {
          "ServerSideEncryptionConfiguration": [
            {
              "ServerSideEncryptionByDefault": {
                "SSEAlgorithm": "AES256"
              }
            }
          ]
        },
        "OwnershipControls": {
          "Rules": [
            {
              "ObjectOwnership": "ObjectWriter"
            }
          ]
        },
        "PublicAccessBlockConfiguration": {
          "BlockPublicAcls": true,
          "BlockPublicPolicy": true,
          "IgnorePublicAcls": true,
          "RestrictPublicBuckets": true
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "VersioningConfiguration": {
          "Status": "Enabled"
        }
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W35",
              "reason": "Used to store access logs for other buckets"
            },
            {
              "id": "W51",
              "reason": "Bucket does not need a bucket policy"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Used to store access logs for other buckets",
              "id": "AwsSolutions-S1"
            },
            {
              "reason": "Bucket is private and is not using HTTP",
              "id": "AwsSolutions-S10"
            }
          ]
        }
      }
    },
    "LogsPolicy90DB40C9": {
      "Type": "AWS::S3::BucketPolicy",
      "Properties": {
        "Bucket": {
          "Ref": "Logs6819BB44"
        },
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:*",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "false"
                }
              },
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "Logs6819BB44",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Logs6819BB44",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "s3:PutObject",
              "Condition": {
                "ArnLike": {
                  "aws:SourceArn": {
                    "Fn::GetAtt": [
                      "Source71E471F1",
                      "Arn"
                    ]
                  }
                },
                "StringEquals": {
                  "aws:SourceAccount": {
                    "Ref": "AWS::AccountId"
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "logging.s3.amazonaws.com"
              },
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Logs6819BB44",
                        "Arn"
                      ]
                    },
                    "/source-bucket-logs/*"
                  ]
                ]
              }
            },
            {
              "Action": "s3:PutObject",
              "Condition": {
                "ArnLike": {
                  "aws:SourceArn": {
                    "Fn::GetAtt": [
                      "Destination920A3C57",
                      "Arn"
                    ]
                  }
                },
                "StringEquals": {
                  "aws:SourceAccount": {
                    "Ref": "AWS::AccountId"
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "logging.s3.amazonaws.com"
              },
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Logs6819BB44",
                        "Arn"
                      ]
                    },
                    "/destination-bucket-logs/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/Logs/Policy/Resource"
      }
    },
    "Source71E471F1": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketEncryption": {
          "ServerSideEncryptionConfiguration": [
            {
              "ServerSideEncryptionByDefault": {
                "SSEAlgorithm": "AES256"
              }
            }
          ]
        },
        "LifecycleConfiguration": {
          "Rules": [
            {
              "Id": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Ref": "AWS::StackName"
                    },
                    "-soure-archive"
                  ]
                ]
              },
              "Status": "Enabled",
              "TagFilters": [
                {
                  "Key": {
                    "Ref": "AWS::StackName"
                  },
                  "Value": "GLACIER"
                }
              ],
              "Transitions": [
                {
                  "StorageClass": "GLACIER",
                  "TransitionInDays": 1
                }
              ]
            },
            {
              "Id": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Ref": "AWS::StackName"
                    },
                    "-source-deep-archive"
                  ]
                ]
              },
              "Status": "Enabled",
              "TagFilters": [
                {
                  "Key": {
                    "Ref": "AWS::StackName"
                  },
                  "Value": "DEEP_ARCHIVE"
                }
              ],
              "Transitions": [
                {
                  "StorageClass": "DEEP_ARCHIVE",
                  "TransitionInDays": 1
                }
              ]
            }
          ]
        },
        "LoggingConfiguration": {
          "DestinationBucketName": {
            "Ref": "Logs6819BB44"
          },
          "LogFilePrefix": "source-bucket-logs/"
        },
        "PublicAccessBlockConfiguration": {
          "BlockPublicAcls": true,
          "BlockPublicPolicy": true,
          "IgnorePublicAcls": true,
          "RestrictPublicBuckets": true
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "VersioningConfiguration": {
          "Status": "Enabled"
        }
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W51",
              "reason": "Bucket does not need a bucket policy"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Bucket is private and is not using HTTP",
              "id": "AwsSolutions-S10"
            }
          ]
        }
      }
    },
    "SourcePolicyE5AB5F73": {
      "Type": "AWS::S3::BucketPolicy",
      "Properties": {
        "Bucket": {
          "Ref": "Source71E471F1"
        },
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:*",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "false"
                }
              },
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "Source71E471F1",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Source71E471F1",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/Source/Policy/Resource"
      }
    },
    "Destination920A3C57": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketEncryption": {
          "ServerSideEncryptionConfiguration": [
            {
              "ServerSideEncryptionByDefault": {
                "SSEAlgorithm": "AES256"
              }
            }
          ]
        },
        "CorsConfiguration": {
          "CorsRules": [
            {
              "AllowedHeaders": [
                "*"
              ],
              "AllowedMethods": [
                "GET"
              ],
              "AllowedOrigins": [
                "*"
              ],
              "MaxAge": 3000
            }
          ]
        },
        "LoggingConfiguration": {
          "DestinationBucketName": {
            "Ref": "Logs6819BB44"
          },
          "LogFilePrefix": "destination-bucket-logs/"
        },
        "PublicAccessBlockConfiguration": {
          "BlockPublicAcls": true,
          "BlockPublicPolicy": true,
          "IgnorePublicAcls": true,
          "RestrictPublicBuckets": true
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "VersioningConfiguration": {
          "Status": "Enabled"
        }
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/Destination/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Bucket is private and is not using HTTP",
              "id": "AwsSolutions-S10"
            }
          ]
        }
      }
    },
    "DestinationPolicy7982387E": {
      "Type": "AWS::S3::BucketPolicy",
      "Properties": {
        "Bucket": {
          "Ref": "Destination920A3C57"
        },
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:*",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "false"
                }
              },
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "Destination920A3C57",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Destination920A3C57",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "s3:GetObject",
              "Condition": {
                "StringEquals": {
                  "AWS:SourceArn": {
                    "Fn::Join": [
                      "",
                      [
                        "arn:",
                        {
                          "Ref": "AWS::Partition"
                        },
                        ":cloudfront::",
                        {
                          "Ref": "AWS::AccountId"
                        },
                        ":distribution/",
                        {
                          "Ref": "CloudFrontToS3CloudFrontDistribution241D9866"
                        }
                      ]
                    ]
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "cloudfront.amazonaws.com"
              },
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Destination920A3C57",
                        "Arn"
                      ]
                    },
                    "/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/Destination/Policy/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "F16",
              "reason": "Public website bucket policy requires a wildcard principal"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Bucket is private and is not using HTTP",
              "id": "AwsSolutions-S10"
            }
          ]
        }
      }
    },
    "CachePolicy26D8A535": {
      "Type": "AWS::CloudFront::CachePolicy",
      "Properties": {
        "CachePolicyConfig": {
          "DefaultTTL": 86400,
          "MaxTTL": 86400,
          "MinTTL": 0,
          "Name": {
            "Fn::Join": [
              "",
              [
                "cp-",
                {
                  "Ref": "AWS::Region"
                },
                "-",
                {
                  "Ref": "AWS::StackName"
                }
              ]
            ]
          },
          "ParametersInCacheKeyAndForwardedToOrigin": {
            "CookiesConfig": {
              "CookieBehavior": "none"
            },
            "EnableAcceptEncodingBrotli": false,
            "EnableAcceptEncodingGzip": false,
            "HeadersConfig": {
              "HeaderBehavior": "whitelist",
              "Headers": [
                "Origin",
                "Access-Control-Request-Method",
                "Access-Control-Request-Headers"
              ]
            },
            "QueryStringsConfig": {
              "QueryStringBehavior": "none"
            }
          }
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/CachePolicy/Resource"
      }
    },
    "CloudFrontToS3CloudFrontOacFB5D4E73": {
      "Type": "AWS::CloudFront::OriginAccessControl",
      "Properties": {
        "OriginAccessControlConfig": {
          "Description": "Origin access control provisioned by aws-cloudfront-s3",
          "Name": {
            "Fn::Join": [
              "",
              [
                "aws-cloudfront-s3-CloutToS3-",
                {
                  "Fn::Select": [
                    2,
                    {
                      "Fn::Split": [
                        "/",
                        {
                          "Ref": "AWS::StackId"
                        }
                      ]
                    }
                  ]
                }
              ]
            ]
          },
          "OriginAccessControlOriginType": "s3",
          "SigningBehavior": "always",
          "SigningProtocol": "sigv4"
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/CloudFrontToS3/CloudFrontOac"
      }
    },
    "CloudFrontToS3CloudFrontDistribution241D9866": {
      "Type": "AWS::CloudFront::Distribution",
      "Properties": {
        "DistributionConfig": {
          "DefaultCacheBehavior": {
            "AllowedMethods": [
              "GET",
              "HEAD"
            ],
            "CachePolicyId": {
              "Ref": "CachePolicy26D8A535"
            },
            "Compress": true,
            "TargetOriginId": "VideoOnDemandCloudFrontToS3CloudFrontDistributionOrigin1CC6EEFFD",
            "ViewerProtocolPolicy": "redirect-to-https"
          },
          "DefaultRootObject": "index.html",
          "Enabled": true,
          "HttpVersion": "http2",
          "IPV6Enabled": true,
          "Logging": {
            "Bucket": {
              "Fn::GetAtt": [
                "Logs6819BB44",
                "RegionalDomainName"
              ]
            },
            "Prefix": "cloudfront-logs/"
          },
          "Origins": [
            {
              "DomainName": {
                "Fn::GetAtt": [
                  "Destination920A3C57",
                  "RegionalDomainName"
                ]
              },
              "Id": "VideoOnDemandCloudFrontToS3CloudFrontDistributionOrigin1CC6EEFFD",
              "OriginAccessControlId": {
                "Fn::GetAtt": [
                  "CloudFrontToS3CloudFrontOacFB5D4E73",
                  "Id"
                ]
              },
              "S3OriginConfig": {
                "OriginAccessIdentity": ""
              }
            }
          ],
          "PriceClass": "PriceClass_100"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/CloudFrontToS3/CloudFrontDistribution/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W70",
              "reason": "Since the distribution uses the CloudFront domain name, CloudFront automatically sets the security policy to TLSv1 regardless of the value of MinimumProtocolVersion"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Use case does not warrant CloudFront Geo restriction",
              "id": "AwsSolutions-CFR1"
            },
            {
              "reason": "Use case does not warrant CloudFront integration with AWS WAF",
              "id": "AwsSolutions-CFR2"
            },
            {
              "reason": "CloudFront automatically sets the security policy to TLSv1 when the distribution uses the CloudFront domain name",
              "id": "AwsSolutions-CFR4"
            },
            {
              "reason": "False alarm. The AWS-cloudfront-s3 solutions construct provides Origin-Access-Control by default.",
              "id": "AwsSolutions-CFR7"
            }
          ]
        }
      }
    },
    "CustomResourceRoleAB1EF463": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is required to create CloudWatch logs and interact with MediaConvert / MediaPackage actions that do not support resource level permissions"
            },
            {
              "id": "W76",
              "reason": "All policies are required by the custom resource."
            }
          ]
        }
      }
    },
    "CustomResourcePolicy79526710": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            },
            {
              "Action": [
                "s3:PutBucketNotification",
                "s3:PutObject",
                "s3:PutObjectAcl"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "Source71E471F1",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "mediaconvert:CreatePreset",
                "mediaconvert:CreateJobTemplate",
                "mediaconvert:DeletePreset",
                "mediaconvert:DeleteJobTemplate",
                "mediaconvert:DescribeEndpoints",
                "mediaconvert:ListJobTemplates",
                "mediaconvert:TagResource",
                "mediaconvert:UntagResource"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":mediaconvert:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":*"
                  ]
                ]
              }
            },
            {
              "Action": [
                "mediapackage-vod:DeleteAsset",
                "mediapackage-vod:DeletePackagingConfiguration"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":mediapackage-vod:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":assets/*"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":mediapackage-vod:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":packaging-configurations/packaging-config-*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "mediapackage-vod:DescribePackagingGroup",
                "mediapackage-vod:DeletePackagingGroup"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":mediapackage-vod:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":packaging-groups/",
                    {
                      "Ref": "AWS::StackName"
                    },
                    "-packaging-group"
                  ]
                ]
              }
            },
            {
              "Action": [
                "mediapackage-vod:CreatePackagingConfiguration",
                "mediapackage-vod:CreatePackagingGroup",
                "mediapackage-vod:ListAssets",
                "mediapackage-vod:ListPackagingConfigurations",
                "mediapackage-vod:ListPackagingGroups",
                "mediapackage-vod:TagResource",
                "mediapackage-vod:UntagResource"
              ],
              "Effect": "Allow",
              "Resource": "*"
            },
            {
              "Action": [
                "cloudfront:GetDistributionConfig",
                "cloudfront:UpdateDistribution"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":cloudfront::",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":distribution/",
                    {
                      "Ref": "CloudFrontToS3CloudFrontDistribution241D9866"
                    }
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "CustomResourcePolicy79526710",
        "Roles": [
          {
            "Ref": "CustomResourceRoleAB1EF463"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W12",
              "reason": "* is required to create CloudWatch logs and interact with MediaConvert / MediaPackage actions that do not support resource level permissions"
            },
            {
              "id": "W76",
              "reason": "High complexity due to number of policy statements needed for creating all custom resources"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Resource ARNs are not generated at the time of policy creation",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "CustomResource8CDCD7A7": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assetc587fc851ec57d475686ca38ea36025a96c240ba0ad653246509f45d99ec5cdc.zip"
        },
        "Description": "Used to deploy resources not supported by CloudFormation",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14"
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-custom-resource"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "CustomResourceRoleAB1EF463",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 30
      },
      "DependsOn": [
        "CustomResourcePolicy79526710",
        "CustomResourceRoleAB1EF463"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            },
            {
              "id": "W89",
              "reason": "This CustomResource does not need to be deployed inside a VPC"
            },
            {
              "id": "W92",
              "reason": "This CustomResource does not need to define ReservedConcurrentExecutions to reserve simultaneous executions"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "MediaConvertEndPoint": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "EndPoint"
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaConvertEndPoint/Default"
      }
    },
    "MediaConvertTemplates": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "MediaConvertTemplates",
        "StackName": {
          "Ref": "AWS::StackName"
        },
        "EndPoint": {
          "Fn::GetAtt": [
            "MediaConvertEndPoint",
            "EndpointUrl"
          ]
        },
        "EnableMediaPackage": {
          "Fn::If": [
            "EnableMediaPackageCondition",
            "true",
            "false"
          ]
        },
        "EnableNewTemplates": true
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaConvertTemplates/Default"
      }
    },
    "MediaPackageVod": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "MediaPackageVod",
        "StackName": {
          "Ref": "AWS::StackName"
        },
        "GroupId": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-packaging-group"
            ]
          ]
        },
        "PackagingConfigurations": "HLS,DASH,MSS,CMAF",
        "DistributionId": {
          "Ref": "CloudFrontToS3CloudFrontDistribution241D9866"
        },
        "EnableMediaPackage": {
          "Fn::If": [
            "EnableMediaPackageCondition",
            "true",
            "false"
          ]
        }
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaPackageVod/Default"
      }
    },
    "MediaConvertRole031A64A9": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "mediaconvert.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "/* required to get/put objects to S3"
            }
          ]
        }
      }
    },
    "MediaConvertPolicy91CC58C0": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "s3:GetObject",
                "s3:PutObject"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Source71E471F1",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Destination920A3C57",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "execute-api:Invoke",
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":execute-api:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-mediatranscode-policy"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "MediaConvertRole031A64A9"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaConvertPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "/* required to get/put objects to S3",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "MediaPackageVodRole931E8163": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "mediapackage.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is required to get objects from S3"
            }
          ]
        }
      }
    },
    "MediaPackageVodPolicy1DC9ECF2": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "s3:GetObject",
                "s3:GetBucketLocation",
                "s3:GetBucketRequestPayment"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "Destination920A3C57",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "Destination920A3C57",
                          "Arn"
                        ]
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-mediapackagevod-policy"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "MediaPackageVodRole931E8163"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaPackageVodPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "/* required to get/put objects to S3",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "SnsTopic2C1570A4": {
      "Type": "AWS::SNS::Topic",
      "Properties": {
        "DisplayName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-Notifications"
            ]
          ]
        },
        "KmsMasterKeyId": "alias/aws/sns",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SnsTopic/Resource"
      }
    },
    "SnsTopicTokenSubscription1D5A46B4F": {
      "Type": "AWS::SNS::Subscription",
      "Properties": {
        "Endpoint": {
          "Ref": "AdminEmail"
        },
        "Protocol": "email",
        "TopicArn": {
          "Ref": "SnsTopic2C1570A4"
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SnsTopic/TokenSubscription:1/Resource"
      }
    },
    "SqsQueueDlqFD591F76": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "KmsDataKeyReusePeriodSeconds": 300,
        "KmsMasterKeyId": "alias/aws/sqs",
        "QueueName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-dlq"
            ]
          ]
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "VisibilityTimeout": 120
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SqsQueueDlq/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "This resource is a DLQ",
              "id": "AwsSolutions-SQS3"
            }
          ]
        }
      }
    },
    "SqsQueueDlqPolicy601D5F1E": {
      "Type": "AWS::SQS::QueuePolicy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sqs:*",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "false"
                }
              },
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Resource": {
                "Fn::GetAtt": [
                  "SqsQueueDlqFD591F76",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Queues": [
          {
            "Ref": "SqsQueueDlqFD591F76"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SqsQueueDlq/Policy/Resource"
      }
    },
    "SqsQueue13597403": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "KmsDataKeyReusePeriodSeconds": 300,
        "KmsMasterKeyId": "alias/aws/sqs",
        "QueueName": {
          "Ref": "AWS::StackName"
        },
        "RedrivePolicy": {
          "deadLetterTargetArn": {
            "Fn::GetAtt": [
              "SqsQueueDlqFD591F76",
              "Arn"
            ]
          },
          "maxReceiveCount": 1
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "VisibilityTimeout": 120
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SqsQueue/Resource"
      }
    },
    "SqsQueuePolicy24A842E9": {
      "Type": "AWS::SQS::QueuePolicy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sqs:*",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "false"
                }
              },
              "Effect": "Deny",
              "Principal": {
                "AWS": "*"
              },
              "Resource": {
                "Fn::GetAtt": [
                  "SqsQueue13597403",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Queues": [
          {
            "Ref": "SqsQueue13597403"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SqsQueue/Policy/Resource"
      }
    },
    "DynamoDBTable59784FC0": {
      "Type": "AWS::DynamoDB::Table",
      "Properties": {
        "AttributeDefinitions": [
          {
            "AttributeName": "guid",
            "AttributeType": "S"
          },
          {
            "AttributeName": "srcBucket",
            "AttributeType": "S"
          },
          {
            "AttributeName": "startTime",
            "AttributeType": "S"
          }
        ],
        "BillingMode": "PAY_PER_REQUEST",
        "GlobalSecondaryIndexes": [
          {
            "IndexName": "srcBucket-startTime-index",
            "KeySchema": [
              {
                "AttributeName": "srcBucket",
                "KeyType": "HASH"
              },
              {
                "AttributeName": "startTime",
                "KeyType": "RANGE"
              }
            ],
            "Projection": {
              "ProjectionType": "ALL"
            }
          }
        ],
        "KeySchema": [
          {
            "AttributeName": "guid",
            "KeyType": "HASH"
          }
        ],
        "PointInTimeRecoverySpecification": {
          "PointInTimeRecoveryEnabled": true
        },
        "TableName": {
          "Ref": "AWS::StackName"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W28",
              "reason": "Table name is set to the stack name"
            },
            {
              "id": "W74",
              "reason": "The DynamoDB table is configured to use the default encryption"
            }
          ]
        }
      }
    },
    "ErrorHandlerRole361CFEB7": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "ErrorHandlerPolicyF920541C": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sns:Publish",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "true"
                }
              },
              "Effect": "Allow",
              "Resource": {
                "Ref": "SnsTopic2C1570A4"
              }
            },
            {
              "Action": "dynamodb:UpdateItem",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "DynamoDBTable59784FC0",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-error-handler-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "ErrorHandlerRole361CFEB7"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/ErrorHandlerPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "ErrorHandlerLambdaFC10367C": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset8dbbe017290aeca280d0efe16d3b9a973b881e03ef4746ff974568d11a3eea78.zip"
        },
        "Description": "Captures and processes workflow errors",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "DynamoDBTable": {
              "Ref": "DynamoDBTable59784FC0"
            },
            "SnsTopic": {
              "Ref": "SnsTopic2C1570A4"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-error-handler"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "ErrorHandlerRole361CFEB7",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "ErrorHandlerPolicyF920541C",
        "ErrorHandlerRole361CFEB7"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            },
            {
              "id": "W89",
              "reason": "This resource does not need to be deployed inside a VPC"
            },
            {
              "id": "W92",
              "reason": "This resource does not need to define ReservedConcurrentExecutions to reserve simultaneous executions"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "ErrorHandlerLambdaCloudWatchLambdaInvokeErrors73673741": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "ErrorHandlerLambdaFC10367C",
            "Arn"
          ]
        },
        "Principal": "events.amazonaws.com",
        "SourceArn": {
          "Fn::GetAtt": [
            "EncodeErrorRule4CB53BA6",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "ErrorHandlerPolicyF920541C",
        "ErrorHandlerRole361CFEB7"
      ],
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/ErrorHandlerLambda/CloudWatchLambdaInvokeErrors"
      }
    },
    "EncodeErrorRule4CB53BA6": {
      "Type": "AWS::Events::Rule",
      "Properties": {
        "Description": "MediaConvert Error event rule",
        "EventPattern": {
          "source": [
            "aws.mediaconvert"
          ],
          "detail": {
            "status": [
              "ERROR"
            ],
            "userMetadata": {
              "workflow": [
                {
                  "Ref": "AWS::StackName"
                }
              ]
            }
          }
        },
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-EncodeError"
            ]
          ]
        },
        "State": "ENABLED",
        "Targets": [
          {
            "Arn": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "Id": "Target0"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/EncodeErrorRule/Resource"
      }
    },
    "EncodeErrorRuleAllowEventRuleVideoOnDemandErrorHandlerLambda7A429D30DEEF909F": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "ErrorHandlerLambdaFC10367C",
            "Arn"
          ]
        },
        "Principal": "events.amazonaws.com",
        "SourceArn": {
          "Fn::GetAtt": [
            "EncodeErrorRule4CB53BA6",
            "Arn"
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/EncodeErrorRule/AllowEventRuleVideoOnDemandErrorHandlerLambda7A429D30"
      }
    },
    "InputValidateRole862FC6A2": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "InputValidatePolicyAC31247E": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:GetObject",
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Source71E471F1",
                        "Arn"
                      ]
                    },
                    "/*"
                  ]
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-input-validate-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "InputValidateRole862FC6A2"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/InputValidatePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "InputValidateLambdaA739FF97": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset3631cc37283e11713743b8df2d1aee37e3fa583173f2d640600f46b431bad83d.zip"
        },
        "Description": "Validates the input given to the workflow",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "WorkflowName": {
              "Ref": "AWS::StackName"
            },
            "Source": {
              "Ref": "Source71E471F1"
            },
            "Destination": {
              "Ref": "Destination920A3C57"
            },
            "FrameCapture": {
              "Fn::If": [
                "FrameCaptureCondition",
                "true",
                "false"
              ]
            },
            "ArchiveSource": {
              "Ref": "Glacier"
            },
            "MediaConvert_Template_2160p": {
              "Fn::If": [
                "EnableMediaPackageCondition",
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_2160p_Avc_Aac_16x9_mvod_no_preset"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_2160p_Avc_Aac_16x9_qvbr_no_preset"
                    ]
                  ]
                }
              ]
            },
            "MediaConvert_Template_1080p": {
              "Fn::If": [
                "EnableMediaPackageCondition",
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_1080p_Avc_Aac_16x9_mvod_no_preset"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_1080p_Avc_Aac_16x9_qvbr_no_preset"
                    ]
                  ]
                }
              ]
            },
            "MediaConvert_Template_720p": {
              "Fn::If": [
                "EnableMediaPackageCondition",
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_720p_Avc_Aac_16x9_mvod_no_preset"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "AWS::StackName"
                      },
                      "_Ott_720p_Avc_Aac_16x9_qvbr_no_preset"
                    ]
                  ]
                }
              ]
            },
            "CloudFront": {
              "Fn::GetAtt": [
                "CloudFrontToS3CloudFrontDistribution241D9866",
                "DomainName"
              ]
            },
            "EnableMediaPackage": {
              "Fn::If": [
                "EnableMediaPackageCondition",
                "true",
                "false"
              ]
            },
            "InputRotate": "DEGREE_0",
            "EnableSns": {
              "Fn::If": [
                "EnableSnsCondition",
                "true",
                "false"
              ]
            },
            "EnableSqs": {
              "Fn::If": [
                "EnableSqsCondition",
                "true",
                "false"
              ]
            },
            "AcceleratedTranscoding": {
              "Ref": "AcceleratedTranscoding"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-input-validate"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "InputValidateRole862FC6A2",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "InputValidatePolicyAC31247E",
        "InputValidateRole862FC6A2"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "MediaInfoRole16C46683": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "MediaInfoPolicy1D8C0D8D": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:GetObject",
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Source71E471F1",
                        "Arn"
                      ]
                    },
                    "/*"
                  ]
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-mediainfo-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "MediaInfoRole16C46683"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/MediaInfoPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "MediaInfoLambda172F634B": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assete4899f3db3d7817d4158339ba10756cb0e32ac75338deb37eaca8d835dc5c841.zip"
        },
        "Description": "Runs mediainfo on a pre-signed S3 URL",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-mediainfo"
            ]
          ]
        },
        "Handler": "lambda_function.lambda_handler",
        "Role": {
          "Fn::GetAtt": [
            "MediaInfoRole16C46683",
            "Arn"
          ]
        },
        "Runtime": "python3.13",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "MediaInfoPolicy1D8C0D8D",
        "MediaInfoRole16C46683"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "DynamoUpdateRoleB73E97DD": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "DynamoUpdatePolicy7828BC4E": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "dynamodb:UpdateItem",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "DynamoDBTable59784FC0",
                  "Arn"
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-dynamo-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "DynamoUpdateRoleB73E97DD"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/DynamoUpdatePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "DynamoUpdateLambda0DF14C26": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset62c1be8c669ae359254523305c6b213a0766ade690e538101ea03420db5bffb9.zip"
        },
        "Description": "Updates DynamoDB with event data",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "DynamoDBTable": {
              "Ref": "DynamoDBTable59784FC0"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-dynamo"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "DynamoUpdateRoleB73E97DD",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "DynamoUpdatePolicy7828BC4E",
        "DynamoUpdateRoleB73E97DD"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "ProfilerRole5E433579": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "ProfilerPolicy71C838D4": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "dynamodb:GetItem",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "DynamoDBTable59784FC0",
                  "Arn"
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-profiler-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "ProfilerRole5E433579"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/ProfilerPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "ProfilerLambdaFAFF7893": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset14f89bdb4009a6477bbbd08294fc267b491b140e81efcc664d4686e948dd2d79.zip"
        },
        "Description": "Sets an EncodeProfile based on mediainfo output",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "DynamoDBTable": {
              "Ref": "DynamoDBTable59784FC0"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-profiler"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "ProfilerRole5E433579",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "ProfilerPolicy71C838D4",
        "ProfilerRole5E433579"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "EncodeRole36198881": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "EncodePolicy89CB6B7C": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "mediaconvert:CreateJob",
                "mediaconvert:GetJobTemplate",
                "mediaconvert:TagResource",
                "mediaconvert:UntagResource"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":mediaconvert:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":*"
                  ]
                ]
              }
            },
            {
              "Action": "iam:PassRole",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "MediaConvertRole031A64A9",
                  "Arn"
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-encode-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "EncodeRole36198881"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/EncodePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "EncodeLambdaDADCB2BB": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assetf6d1e1f8411d13ca92037c77f5bf4e696a44176cbea810de092b8dbf0bd46b5f.zip"
        },
        "Description": "Creates a MediaConvert encode job",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "MediaConvertRole": {
              "Fn::GetAtt": [
                "MediaConvertRole031A64A9",
                "Arn"
              ]
            },
            "EndPoint": {
              "Fn::GetAtt": [
                "MediaConvertEndPoint",
                "EndpointUrl"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-encode"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "EncodeRole36198881",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "EncodePolicy89CB6B7C",
        "EncodeRole36198881"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "OutputValidateRole553C8CD2": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "OutputValidatePolicy8D988909": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "dynamodb:GetItem",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "DynamoDBTable59784FC0",
                  "Arn"
                ]
              }
            },
            {
              "Action": "s3:ListBucket",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "Destination920A3C57",
                  "Arn"
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-output-validate-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "OutputValidateRole553C8CD2"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/OutputValidatePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "OutputValidateLambda2645C4BB": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assetdb9c5cb0b93fd818d2bbc7f266deb491bf6f6cc0806a5a9bc56dcf9f337f7fa8.zip"
        },
        "Description": "Parses MediaConvert job output",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "DynamoDBTable": {
              "Ref": "DynamoDBTable59784FC0"
            },
            "EndPoint": {
              "Fn::GetAtt": [
                "MediaConvertEndPoint",
                "EndpointUrl"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-output-validate"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "OutputValidateRole553C8CD2",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "OutputValidatePolicy8D988909",
        "OutputValidateRole553C8CD2"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "ArchiveSourceRole49DA53ED": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "ArchiveSourcePolicy1D98A4F5": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:PutObjectTagging",
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    {
                      "Fn::GetAtt": [
                        "Source71E471F1",
                        "Arn"
                      ]
                    },
                    "/*"
                  ]
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-archive-source-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "ArchiveSourceRole49DA53ED"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/ArchiveSourcePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "ArchiveSourceLambda320F09D9": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset098a02c86a7f0b481a3eae52ec6a28e090bff9d01d00e4ea0d68f591e09e327c.zip"
        },
        "Description": "Updates tags on source files to enable Glacier",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-archive-source"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "ArchiveSourceRole49DA53ED",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "ArchiveSourcePolicy1D98A4F5",
        "ArchiveSourceRole49DA53ED"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "SqsSendMessageRole23292716": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "SqsSendMessagePolicy702314CC": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sqs:SendMessage",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "true"
                }
              },
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "SqsQueue13597403",
                  "Arn"
                ]
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-sqs-publish-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "SqsSendMessageRole23292716"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SqsSendMessagePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "SqsSendMessageLambda156FD22A": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asseta15fade362b055b248618a757170e5ba71a3a170ad933f596e5d08567adbf56c.zip"
        },
        "Description": "Publish the workflow results to an SQS queue",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "SqsQueue": {
              "Ref": "SqsQueue13597403"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-sqs-publish"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "SqsSendMessageRole23292716",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "SqsSendMessagePolicy702314CC",
        "SqsSendMessageRole23292716"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "SnsNotificationRole48AE9F11": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "SnsNotificationPolicy26B12503": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "sns:Publish",
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": "true"
                }
              },
              "Effect": "Allow",
              "Resource": {
                "Ref": "SnsTopic2C1570A4"
              }
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-sns-notification-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "SnsNotificationRole48AE9F11"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/SnsNotificationPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "SnsNotificationLambda1EA4A474": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assetcf5bacaf3c30d9fb41f455265a14f61c6b1a7942a36e3c783cb1c9d35de6ff52.zip"
        },
        "Description": "Sends a notification when the encode job is completed",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "SnsTopic": {
              "Ref": "SnsTopic2C1570A4"
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-sns-notification"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "SnsNotificationRole48AE9F11",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "SnsNotificationPolicy26B12503",
        "SnsNotificationRole48AE9F11"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "MediaPackageAssetsRole5B26B67C": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "MediaPackageAssetsPolicy84101CE2": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "iam:PassRole",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "MediaPackageVodRole931E8163",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "mediapackage-vod:CreateAsset",
                "mediapackage-vod:TagResource",
                "mediapackage-vod:UntagResource"
              ],
              "Effect": "Allow",
              "Resource": "*"
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-media-package-assets-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "MediaPackageAssetsRole5B26B67C"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W12",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "MediaPackageAssetsLambda63EB0986": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/asset6139811e70addbf80f93e47d012088ff14c79f4347200392ff80c271e711a875.zip"
        },
        "Description": "Ingests an asset into MediaPackage-VOD",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            },
            "GroupId": {
              "Fn::GetAtt": [
                "MediaPackageVod",
                "GroupId"
              ]
            },
            "GroupDomainName": {
              "Fn::GetAtt": [
                "MediaPackageVod",
                "GroupDomainName"
              ]
            },
            "MediaPackageVodRole": {
              "Fn::GetAtt": [
                "MediaPackageVodRole931E8163",
                "Arn"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-media-package-assets"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "MediaPackageAssetsRole5B26B67C",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "MediaPackageAssetsPolicy84101CE2",
        "MediaPackageAssetsRole5B26B67C"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W89",
              "reason": "Lambda functions do not need a VPC"
            },
            {
              "id": "W92",
              "reason": "Lambda do not need ReservedConcurrentExecutions in this case"
            },
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "StepFunctionsRole575CBBE2": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "* is used so that the Lambda function can create log groups"
            }
          ]
        }
      }
    },
    "StepFunctionsPolicy4DB3D133": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "states:StartExecution",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":states:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":stateMachine:",
                      {
                        "Ref": "AWS::StackName"
                      },
                      "-ingest"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":states:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":stateMachine:",
                      {
                        "Ref": "AWS::StackName"
                      },
                      "-process"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":states:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":stateMachine:",
                      {
                        "Ref": "AWS::StackName"
                      },
                      "-publish"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "ErrorHandlerLambdaFC10367C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":logs:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":log-group:/aws/lambda/*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-step-functions-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "StepFunctionsRole575CBBE2"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/StepFunctionsPolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "StepFunctionsLambda8B4F69C7": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "video-on-demand-on-aws/v6.1.14/assete8ba3fc881a8b036374c234d1d88a7f031a7acc1cb49ca7277e82d415f8124f8.zip"
        },
        "Description": "Creates a unique identifer (GUID) and executes the Ingest StateMachine",
        "Environment": {
          "Variables": {
            "SOLUTION_IDENTIFIER": "AwsSolution/SO0021/v6.1.14",
            "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
            "IngestWorkflow": {
              "Fn::Join": [
                "",
                [
                  "arn:",
                  {
                    "Ref": "AWS::Partition"
                  },
                  ":states:",
                  {
                    "Ref": "AWS::Region"
                  },
                  ":",
                  {
                    "Ref": "AWS::AccountId"
                  },
                  ":stateMachine:",
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-ingest"
                ]
              ]
            },
            "ProcessWorkflow": {
              "Fn::Join": [
                "",
                [
                  "arn:",
                  {
                    "Ref": "AWS::Partition"
                  },
                  ":states:",
                  {
                    "Ref": "AWS::Region"
                  },
                  ":",
                  {
                    "Ref": "AWS::AccountId"
                  },
                  ":stateMachine:",
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-process"
                ]
              ]
            },
            "PublishWorkflow": {
              "Fn::Join": [
                "",
                [
                  "arn:",
                  {
                    "Ref": "AWS::Partition"
                  },
                  ":states:",
                  {
                    "Ref": "AWS::Region"
                  },
                  ":",
                  {
                    "Ref": "AWS::AccountId"
                  },
                  ":stateMachine:",
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-publish"
                ]
              ]
            },
            "ErrorHandler": {
              "Fn::GetAtt": [
                "ErrorHandlerLambdaFC10367C",
                "Arn"
              ]
            }
          }
        },
        "FunctionName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-step-functions"
            ]
          ]
        },
        "Handler": "index.handler",
        "Role": {
          "Fn::GetAtt": [
            "StepFunctionsRole575CBBE2",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ],
        "Timeout": 120
      },
      "DependsOn": [
        "StepFunctionsPolicy4DB3D133",
        "StepFunctionsRole575CBBE2"
      ],
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W58",
              "reason": "Invalid warning: function has access to cloudwatch"
            },
            {
              "id": "W89",
              "reason": "This resource does not need to be deployed inside a VPC"
            },
            {
              "id": "W92",
              "reason": "This resource does not need to define ReservedConcurrentExecutions to reserve simultaneous executions"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Lambda NodeJS 22 Runtime in development...",
              "id": "AwsSolutions-L1"
            }
          ]
        }
      }
    },
    "StepFunctionsLambdaS3LambdaInvokeVideo456192AA": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "StepFunctionsLambda8B4F69C7",
            "Arn"
          ]
        },
        "Principal": "s3.amazonaws.com",
        "SourceAccount": {
          "Ref": "AWS::AccountId"
        }
      },
      "DependsOn": [
        "StepFunctionsPolicy4DB3D133",
        "StepFunctionsRole575CBBE2"
      ],
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/StepFunctionsLambda/S3LambdaInvokeVideo"
      }
    },
    "StepFunctionsLambdaCloudWatchLambdaInvokeCompletes8CE78F7D": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "StepFunctionsLambda8B4F69C7",
            "Arn"
          ]
        },
        "Principal": "events.amazonaws.com",
        "SourceArn": {
          "Fn::GetAtt": [
            "EncodeCompleteRuleE2F74999",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "StepFunctionsPolicy4DB3D133",
        "StepFunctionsRole575CBBE2"
      ],
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/StepFunctionsLambda/CloudWatchLambdaInvokeCompletes"
      }
    },
    "EncodeCompleteRuleE2F74999": {
      "Type": "AWS::Events::Rule",
      "Properties": {
        "Description": "MediaConvert Completed event rule",
        "EventPattern": {
          "source": [
            "aws.mediaconvert"
          ],
          "detail": {
            "status": [
              "COMPLETE"
            ],
            "userMetadata": {
              "workflow": [
                {
                  "Ref": "AWS::StackName"
                }
              ]
            }
          }
        },
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-EncodeComplete"
            ]
          ]
        },
        "State": "ENABLED",
        "Targets": [
          {
            "Arn": {
              "Fn::GetAtt": [
                "StepFunctionsLambda8B4F69C7",
                "Arn"
              ]
            },
            "Id": "Target0"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/EncodeCompleteRule/Resource"
      }
    },
    "EncodeCompleteRuleAllowEventRuleVideoOnDemandStepFunctionsLambda0CB4E0F5435F3721": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "StepFunctionsLambda8B4F69C7",
            "Arn"
          ]
        },
        "Principal": "events.amazonaws.com",
        "SourceArn": {
          "Fn::GetAtt": [
            "EncodeCompleteRuleE2F74999",
            "Arn"
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/EncodeCompleteRule/AllowEventRuleVideoOnDemandStepFunctionsLambda0CB4E0F5"
      }
    },
    "S3Config": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "S3Notification",
        "Source": {
          "Ref": "Source71E471F1"
        },
        "IngestArn": {
          "Fn::GetAtt": [
            "StepFunctionsLambda8B4F69C7",
            "Arn"
          ]
        },
        "WorkflowTrigger": {
          "Ref": "WorkflowTrigger"
        }
      },
      "DependsOn": [
        "StepFunctionsLambdaCloudWatchLambdaInvokeCompletes8CE78F7D",
        "StepFunctionsLambda8B4F69C7",
        "StepFunctionsLambdaS3LambdaInvokeVideo456192AA"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/S3Config/Default"
      }
    },
    "StepFunctionsServiceRole2A83B843": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": {
                  "Fn::Join": [
                    "",
                    [
                      "states.",
                      {
                        "Ref": "AWS::Region"
                      },
                      ".amazonaws.com"
                    ]
                  ]
                }
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W11",
              "reason": "The * resource is required since the functions need to be created before the state machine"
            }
          ]
        }
      }
    },
    "StepFunctionsServiceRoleDefaultPolicy6AD67B91": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "InputValidateLambdaA739FF97",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "InputValidateLambdaA739FF97",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "MediaInfoLambda172F634B",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "MediaInfoLambda172F634B",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "DynamoUpdateLambda0DF14C26",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "DynamoUpdateLambda0DF14C26",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "StepFunctionsLambda8B4F69C7",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "StepFunctionsLambda8B4F69C7",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "SnsNotificationLambda1EA4A474",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "SnsNotificationLambda1EA4A474",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "ProfilerLambdaFAFF7893",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "ProfilerLambdaFAFF7893",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "EncodeLambdaDADCB2BB",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "EncodeLambdaDADCB2BB",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "OutputValidateLambda2645C4BB",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "OutputValidateLambda2645C4BB",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "ArchiveSourceLambda320F09D9",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "ArchiveSourceLambda320F09D9",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "MediaPackageAssetsLambda63EB0986",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "MediaPackageAssetsLambda63EB0986",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "SqsSendMessageLambda156FD22A",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "SqsSendMessageLambda156FD22A",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "StepFunctionsServiceRoleDefaultPolicy6AD67B91",
        "Roles": [
          {
            "Ref": "StepFunctionsServiceRole2A83B843"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W76",
              "reason": "testestesteslsdkfjsdlkfjlskdfklsdljf"
            }
          ]
        },
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Statements added to default policy by aws-stepfunctions.StateMachine class",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "StepFunctionsServicePolicy7123B955": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":lambda:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":function:*"
                  ]
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-stepfunctions-service-role"
            ]
          ]
        },
        "Roles": [
          {
            "Ref": "StepFunctionsServiceRole2A83B843"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/StepFunctionsServicePolicy/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "* is used so that the Lambda function can create log groups",
              "id": "AwsSolutions-IAM5"
            }
          ]
        }
      }
    },
    "IngestWorkflow58F2BCD4": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Join": [
            "",
            [
              "{\"StartAt\":\"Input Validate\",\"States\":{\"Input Validate\":{\"Next\":\"MediaInfo\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "InputValidateLambdaA739FF97",
                  "Arn"
                ]
              },
              "\"},\"MediaInfo\":{\"Next\":\"DynamoDB Update (Ingest)\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "MediaInfoLambda172F634B",
                  "Arn"
                ]
              },
              "\"},\"DynamoDB Update (Ingest)\":{\"Next\":\"SNS Choice (Ingest)\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "DynamoUpdateLambda0DF14C26",
                  "Arn"
                ]
              },
              "\"},\"SNS Choice (Ingest)\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.enableSns\",\"BooleanEquals\":true,\"Next\":\"SNS Notification (Ingest)\"}],\"Default\":\"Process Execute\"},\"Process Execute\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "StepFunctionsLambda8B4F69C7",
                  "Arn"
                ]
              },
              "\"},\"SNS Notification (Ingest)\":{\"Next\":\"Process Execute\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "SnsNotificationLambda1EA4A474",
                  "Arn"
                ]
              },
              "\"}}}"
            ]
          ]
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "StepFunctionsServiceRole2A83B843",
            "Arn"
          ]
        },
        "StateMachineName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-ingest"
            ]
          ]
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "DependsOn": [
        "StepFunctionsServiceRoleDefaultPolicy6AD67B91",
        "StepFunctionsServiceRole2A83B843"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/IngestWorkflow/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Logging handled by DynamoDB Update step and Error Handler lambda",
              "id": "AwsSolutions-SF1"
            },
            {
              "reason": "Optional configuration for this solution",
              "id": "AwsSolutions-SF2"
            }
          ]
        }
      }
    },
    "ProcessWorkflow95FAF321": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Join": [
            "",
            [
              "{\"StartAt\":\"Profiler\",\"States\":{\"Profiler\":{\"Next\":\"Encoding Profile Check\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "ProfilerLambdaFAFF7893",
                  "Arn"
                ]
              },
              "\"},\"Encoding Profile Check\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.isCustomTemplate\",\"BooleanEquals\":true,\"Next\":\"Custom jobTemplate\"},{\"Variable\":\"$.encodingProfile\",\"NumericEquals\":2160,\"Next\":\"jobTemplate 2160p\"},{\"Variable\":\"$.encodingProfile\",\"NumericEquals\":1080,\"Next\":\"jobTemplate 1080p\"},{\"Variable\":\"$.encodingProfile\",\"NumericEquals\":720,\"Next\":\"jobTemplate 720p\"}]},\"Custom jobTemplate\":{\"Type\":\"Pass\",\"Next\":\"Accelerated Transcoding Check\"},\"Accelerated Transcoding Check\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.acceleratedTranscoding\",\"StringEquals\":\"ENABLED\",\"Next\":\"Enabled\"},{\"Variable\":\"$.acceleratedTranscoding\",\"StringEquals\":\"PREFERRED\",\"Next\":\"Preferred\"},{\"Variable\":\"$.acceleratedTranscoding\",\"StringEquals\":\"DISABLED\",\"Next\":\"Disabled\"}]},\"jobTemplate 2160p\":{\"Type\":\"Pass\",\"Next\":\"Accelerated Transcoding Check\"},\"jobTemplate 1080p\":{\"Type\":\"Pass\",\"Next\":\"Accelerated Transcoding Check\"},\"jobTemplate 720p\":{\"Type\":\"Pass\",\"Next\":\"Accelerated Transcoding Check\"},\"Enabled\":{\"Type\":\"Pass\",\"Next\":\"Frame Capture Check\"},\"Frame Capture Check\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.frameCapture\",\"BooleanEquals\":true,\"Next\":\"Frame Capture\"},{\"Variable\":\"$.frameCapture\",\"BooleanEquals\":false,\"Next\":\"No Frame Capture\"}]},\"Preferred\":{\"Type\":\"Pass\",\"Next\":\"Frame Capture Check\"},\"Disabled\":{\"Type\":\"Pass\",\"Next\":\"Frame Capture Check\"},\"Frame Capture\":{\"Type\":\"Pass\",\"Next\":\"Encode Job Submit\"},\"Encode Job Submit\":{\"Next\":\"DynamoDB Update (Process)\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "EncodeLambdaDADCB2BB",
                  "Arn"
                ]
              },
              "\"},\"No Frame Capture\":{\"Type\":\"Pass\",\"Next\":\"Encode Job Submit\"},\"DynamoDB Update (Process)\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "DynamoUpdateLambda0DF14C26",
                  "Arn"
                ]
              },
              "\"}}}"
            ]
          ]
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "StepFunctionsServiceRole2A83B843",
            "Arn"
          ]
        },
        "StateMachineName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-process"
            ]
          ]
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "DependsOn": [
        "StepFunctionsServiceRoleDefaultPolicy6AD67B91",
        "StepFunctionsServiceRole2A83B843"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/ProcessWorkflow/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Logging handled by DynamoDB Update step and Error Handler lambda",
              "id": "AwsSolutions-SF1"
            },
            {
              "reason": "Optional configuration for this solution",
              "id": "AwsSolutions-SF2"
            }
          ]
        }
      }
    },
    "PublishWorkflowEF670320": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Join": [
            "",
            [
              "{\"StartAt\":\"Validate Encoding Outputs\",\"States\":{\"Validate Encoding Outputs\":{\"Next\":\"Archive Source Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "OutputValidateLambda2645C4BB",
                  "Arn"
                ]
              },
              "\"},\"Archive Source Choice\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.archiveSource\",\"StringEquals\":\"GLACIER\",\"Next\":\"Archive\"},{\"Variable\":\"$.archiveSource\",\"StringEquals\":\"DEEP_ARCHIVE\",\"Next\":\"Deep Archive\"}],\"Default\":\"MediaPackage Choice\"},\"MediaPackage Choice\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.enableMediaPackage\",\"BooleanEquals\":true,\"Next\":\"MediaPackage Assets\"}],\"Default\":\"DynamoDB Update (Publish)\"},\"Archive\":{\"Next\":\"MediaPackage Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "ArchiveSourceLambda320F09D9",
                  "Arn"
                ]
              },
              "\"},\"Deep Archive\":{\"Next\":\"MediaPackage Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "ArchiveSourceLambda320F09D9",
                  "Arn"
                ]
              },
              "\"},\"DynamoDB Update (Publish)\":{\"Next\":\"SQS Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "DynamoUpdateLambda0DF14C26",
                  "Arn"
                ]
              },
              "\"},\"MediaPackage Assets\":{\"Next\":\"DynamoDB Update (Publish)\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "MediaPackageAssetsLambda63EB0986",
                  "Arn"
                ]
              },
              "\"},\"SQS Choice\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.enableSqs\",\"BooleanEquals\":true,\"Next\":\"SQS Send Message\"}],\"Default\":\"SNS Choice (Publish)\"},\"SNS Choice (Publish)\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.enableSns\",\"BooleanEquals\":true,\"Next\":\"SNS Notification (Publish)\"}],\"Default\":\"Complete\"},\"SQS Send Message\":{\"Next\":\"SNS Choice (Publish)\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "SqsSendMessageLambda156FD22A",
                  "Arn"
                ]
              },
              "\"},\"Complete\":{\"Type\":\"Pass\",\"End\":true},\"SNS Notification (Publish)\":{\"Next\":\"Complete\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"",
              {
                "Fn::GetAtt": [
                  "SnsNotificationLambda1EA4A474",
                  "Arn"
                ]
              },
              "\"}}}"
            ]
          ]
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "StepFunctionsServiceRole2A83B843",
            "Arn"
          ]
        },
        "StateMachineName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-publish"
            ]
          ]
        },
        "Tags": [
          {
            "Key": "SolutionId",
            "Value": "SO0021"
          }
        ]
      },
      "DependsOn": [
        "StepFunctionsServiceRoleDefaultPolicy6AD67B91",
        "StepFunctionsServiceRole2A83B843"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/PublishWorkflow/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "Logging handled by DynamoDB Update step and Error Handler lambda",
              "id": "AwsSolutions-SF1"
            },
            {
              "reason": "Optional configuration for this solution",
              "id": "AwsSolutions-SF2"
            }
          ]
        }
      }
    },
    "UUID": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "UUID"
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/UUID/Default"
      }
    },
    "AnonymizedMetric": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "CustomResource8CDCD7A7",
            "Arn"
          ]
        },
        "Resource": "AnonymizedMetric",
        "SolutionId": "SO0021",
        "UUID": {
          "Fn::GetAtt": [
            "UUID",
            "UUID"
          ]
        },
        "Version": "v6.1.14",
        "Transcoder": "MediaConvert",
        "WorkflowTrigger": {
          "Ref": "WorkflowTrigger"
        },
        "Glacier": {
          "Ref": "Glacier"
        },
        "FrameCapture": {
          "Ref": "FrameCapture"
        },
        "EnableMediaPackage": {
          "Ref": "EnableMediaPackage"
        },
        "SendAnonymizedMetric": {
          "Fn::FindInMap": [
            "AnonymizedData",
            "SendAnonymizedData",
            "Data"
          ]
        }
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/AnonymizedMetric/Default"
      }
    },
    "CDKMetadata": {
      "Type": "AWS::CDK::Metadata",
      "Properties": {
        "Analytics": "v2:deflate64:H4sIAAAAAAAA/12SwW7bMAyGnyV3mW0cbNhxrYcCA1Y0i3MPaJlJVNuSJ1IpCsHvPkhOG28X8f9EkfgJsYRYrtdwv8I3LnTbFb1pINaCulPV0W7R40BCPsEzjqOxpyQrZ1sjxlmFb3yIvIH4GHRHkpJXNYet641+v11feYZHZJqU7l1oj95ZgVihPtOt5j988eZk7IPWxFw5K9716odh8aYJ2U11tEuelMEB4s71lFI53rrNalI9Dk2LEJ+C1R9dlnpLfjDMuR9vDshMwvCQgmLLEPduNDq9nEUdGtbejB/1S54U/2GIvwOFbGkW+bwZW+Ck2neLg2sbiHts5jmymBRdyApD3IXreCHdstB4vLrngyB3DL/yhD/txXX07wOIW2RW1dkZTaoWFHpGfTY2d1zyNKkdsQtek8qz14KnvA6BxQ2fuWRkoV+CjEEm9e0LlKvvacvY9flzuNDOsvighe/y+n3uQcEbqBI9Jdq7ejMp61qCV767lCWsv8L96pWNKXywYgaC3Rz/AtkoZGjPAgAA"
      },
      "Metadata": {
        "aws:cdk:path": "VideoOnDemand/CDKMetadata/Default"
      },
      "Condition": "CDKMetadataAvailable"
    }
  },
  "Outputs": {
    "DynamoDBTableName": {
      "Description": "DynamoDB Table",
      "Value": {
        "Ref": "DynamoDBTable59784FC0"
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":DynamoDBTable"
            ]
          ]
        }
      }
    },
    "SourceBucketName": {
      "Description": "Source Bucket",
      "Value": {
        "Ref": "Source71E471F1"
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":Source"
            ]
          ]
        }
      }
    },
    "DestinationBucketName": {
      "Description": "Destination Bucket",
      "Value": {
        "Ref": "Destination920A3C57"
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":Destination"
            ]
          ]
        }
      }
    },
    "CloudFrontDomainName": {
      "Description": "CloudFront Domain Name",
      "Value": {
        "Fn::GetAtt": [
          "CloudFrontToS3CloudFrontDistribution241D9866",
          "DomainName"
        ]
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":CloudFront"
            ]
          ]
        }
      }
    },
    "AnonymizedMetricUUID": {
      "Description": "AnonymizedMetric UUID",
      "Value": {
        "Fn::GetAtt": [
          "UUID",
          "UUID"
        ]
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":UUID"
            ]
          ]
        }
      }
    },
    "SnsTopicName": {
      "Description": "SNS Topic",
      "Value": {
        "Fn::GetAtt": [
          "SnsTopic2C1570A4",
          "TopicName"
        ]
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":SnsTopic"
            ]
          ]
        }
      }
    },
    "SqsUrl": {
      "Description": "SQS Queue URL",
      "Value": {
        "Ref": "SqsQueue13597403"
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":SqsQueue"
            ]
          ]
        }
      }
    },
    "SqsArn": {
      "Description": "SQS Queue ARN",
      "Value": {
        "Fn::GetAtt": [
          "SqsQueue13597403",
          "Arn"
        ]
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              ":SqsQueueArn"
            ]
          ]
        }
      }
    }
  }
}