AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0042) - aws-content-analysis. This is the base AWS CloudFormation template that provisions resources for the AWS Content Analysis solution over an existing Media Insights Engine stack." Parameters: MieStackName: Description: Name of the Media Insights Engine framework stack Type: String AdminEmail: Description: Email address of the Content Analysis Administrator Type: String OpensearchNodeSize: Description: "The node type to be provisioned for the Opensearch cluster" Type: String Default: "t3.small.search" AllowedValues: - "t3.small.search" - "m4.large.search" - "m4.xlarge.search" - "c4.large.search" - "c4.xlarge.search" - "r4.large.search" - "r4.xlarge.search" Mappings: ContentAnalysisApp: SourceCode: GlobalS3Bucket: "%%GLOBAL_BUCKET_NAME%%" TemplateKeyPrefix: "content-analysis-on-aws/%%VERSION%%" Resources: # Deploy Opensearch OpensearchStack: Type: "AWS::CloudFormation::Stack" Properties: TemplateURL: !Join - "" - - "https://" - !FindInMap - ContentAnalysisApp - SourceCode - GlobalS3Bucket - ".s3.amazonaws.com/" - !FindInMap - ContentAnalysisApp - SourceCode - TemplateKeyPrefix - "/aws-content-analysis-opensearch.template" Parameters: AnalyticsStreamArn: Fn::ImportValue: !Sub "${MieStackName}:AnalyticsStreamArn" MieDataplaneBucket: Fn::ImportValue: !Sub "${MieStackName}:DataplaneBucket" NodeType: !Ref OpensearchNodeSize MieKMSKeyArn: Fn::ImportValue: !Sub "${MieStackName}:MieKMSArn" # Deploy Auth stack ContentAnalysisAuthStack: Type: "AWS::CloudFormation::Stack" Properties: TemplateURL: !Join - "" - - "https://" - !FindInMap - ContentAnalysisApp - SourceCode - GlobalS3Bucket - ".s3.amazonaws.com/" - !FindInMap - ContentAnalysisApp - SourceCode - TemplateKeyPrefix - "/aws-content-analysis-auth.template" Parameters: AdminEmail: !Ref AdminEmail WorkflowApiId: Fn::ImportValue: !Sub "${MieStackName}:WorkflowApiId" DataplaneApiId: Fn::ImportValue: !Sub "${MieStackName}:DataplaneApiId" SearchDomainArn: !GetAtt OpensearchStack.Outputs.DomainArn DataplaneBucket: Fn::ImportValue: !Sub "${MieStackName}:DataplaneBucket" ParentStackName: !Ref AWS::StackId MieKMSKeyArn: Fn::ImportValue: !Sub "${MieStackName}:MieKMSArn" # Deploy Video Workflow CompleteVideoWorkflow: Type: "AWS::CloudFormation::Stack" Properties: TemplateURL: !Join - "" - - "https://" - !FindInMap - ContentAnalysisApp - SourceCode - GlobalS3Bucket - ".s3.amazonaws.com/" - !FindInMap - ContentAnalysisApp - SourceCode - TemplateKeyPrefix - "/aws-content-analysis-video-workflow.template" Parameters: WorkflowCustomResourceArn: Fn::ImportValue: !Sub "${MieStackName}:WorkflowCustomResourceArn" OperatorLibraryStack: Fn::ImportValue: !Sub "${MieStackName}:OperatorLibraryStack" # Deploy image workflow CompleteImageWorkflow: Type: "AWS::CloudFormation::Stack" Properties: TemplateURL: !Join - "" - - "https://" - !FindInMap - ContentAnalysisApp - SourceCode - GlobalS3Bucket - ".s3.amazonaws.com/" - !FindInMap - ContentAnalysisApp - SourceCode - TemplateKeyPrefix - "/aws-content-analysis-image-workflow.template" Parameters: WorkflowCustomResourceArn: Fn::ImportValue: !Sub "${MieStackName}:WorkflowCustomResourceArn" OperatorLibraryStack: Fn::ImportValue: !Sub "${MieStackName}:OperatorLibraryStack" ContentAnalysisWebStack: Type: "AWS::CloudFormation::Stack" Properties: TemplateURL: !Join - "" - - "https://" - !FindInMap - ContentAnalysisApp - SourceCode - GlobalS3Bucket - ".s3.amazonaws.com/" - !FindInMap - ContentAnalysisApp - SourceCode - TemplateKeyPrefix - "/aws-content-analysis-web.template" Parameters: DataplaneEndpoint: Fn::ImportValue: !Sub "${MieStackName}:DataplaneApiEndpoint" WorkflowEndpoint: Fn::ImportValue: !Sub "${MieStackName}:WorkflowApiEndpoint" SearchEndpoint: !GetAtt OpensearchStack.Outputs.DomainEndpoint DataplaneBucket: Fn::ImportValue: !Sub "${MieStackName}:DataplaneBucket" UserPoolId: !GetAtt ContentAnalysisAuthStack.Outputs.UserPoolId IdentityPoolId: !GetAtt ContentAnalysisAuthStack.Outputs.IdentityPoolId PoolClientId: !GetAtt ContentAnalysisAuthStack.Outputs.UserPoolClientId Outputs: ContentAnalyisSolution: Value: !GetAtt ContentAnalysisWebStack.Outputs.CloudfrontUrl SearchEndpoint: Value: !GetAtt OpensearchStack.Outputs.DomainEndpoint UserPoolId: Value: !GetAtt ContentAnalysisAuthStack.Outputs.UserPoolId IdentityPoolId: Value: !GetAtt ContentAnalysisAuthStack.Outputs.IdentityPoolId UserPoolClientId: Value: !GetAtt ContentAnalysisAuthStack.Outputs.UserPoolClientId