AWSTemplateFormatVersion: "2010-09-09" Description: Amazon Transcribe Post Call Analytics - PCA UI Parameters: AdminUsername: Type: String Default: "admin" Description: (Required) Username for admin user AdminEmail: Type: String Description: >- (Required) Email address for the admin user. Will be used for logging in and for setting the admin password. This email will receive the temporary password for the admin user. AllowedPattern: ".+\\@.+\\..+" ConstraintDescription: Must be valid email address eg. johndoe@example.com AudioBucket: Type: String Default: InputBucketName Description: S3 bucket containing audio files. Audio object names must be prefixed with nci/ DataBucket: Type: String Default: OutputBucketName Description: S3 bucket containing Transcribe output. JSON object names must be prefixed with parseFiles/ DataPrefix: Type: String Default: OutputBucketParsedResults Description: Prefix that parsed transcription output is stored under in DataBucket MainStackName: Type: String Default: "" Environment: Type: String Conditions: isMainStackNameEmpty: !Equals [!Ref MainStackName, ''] Resources: DeployCount: Type: AWS::SSM::Parameter Properties: Type: String Value: "0" Web: Type: AWS::CloudFormation::Stack Properties: TemplateURL: lib/web.template TimeoutInMinutes: 20 Parameters: AudioBucket: !Ref AudioBucket DataBucket: !Ref DataBucket Cognito: Type: AWS::CloudFormation::Stack Properties: TemplateURL: lib/cognito.template Parameters: AdminUsername: !Ref AdminUsername AdminEmail: !Ref AdminEmail WebUri: !GetAtt Web.Outputs.Uri Environment: !Ref Environment Name: !If - isMainStackNameEmpty - !Ref AWS::StackName - !Ref MainStackName Indexer: Type: AWS::CloudFormation::Stack Properties: TemplateURL: lib/indexer.template Parameters: DataBucket: !Ref DataBucket DataPrefix: !Ref DataPrefix Api: Type: AWS::CloudFormation::Stack Properties: TemplateURL: lib/api.template Parameters: AudioBucket: !Ref AudioBucket DataBucket: !Ref DataBucket TableName: !GetAtt Indexer.Outputs.TableName UserPoolId: !GetAtt Cognito.Outputs.UserPoolId Deploy: Type: AWS::CloudFormation::Stack Properties: TemplateURL: lib/deploy.template Parameters: Bucket: !GetAtt Web.Outputs.Bucket AuthUri: !GetAtt Cognito.Outputs.BaseUri AuthClientId: !GetAtt Cognito.Outputs.UserPoolClientId ApiUri: !GetAtt Api.Outputs.Uri DeployCountName: !Ref DeployCount DeployCountValue: !Ref DeployCount Outputs: DataBucket: Value: !Ref DataBucket AudioBucket: Value: !Ref AudioBucket WebBucket: Value: !GetAtt Web.Outputs.Bucket AuthUri: Value: !GetAtt Cognito.Outputs.BaseUri AuthClientId: Value: !GetAtt Cognito.Outputs.UserPoolClientId ApiUri: Value: !GetAtt Api.Outputs.Uri WebUri: Value: !GetAtt Web.Outputs.Uri RolesForKMSKey: Value: !Join - ', ' - - !Sub '${Api.Outputs.RolesForKMSKey}' - !Sub '${Indexer.Outputs.RolesForKMSKey}' - !Sub '${Deploy.Outputs.RolesForKMSKey}' - !Sub '${Web.Outputs.RolesForKMSKey}'