Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions pca-main-nokendra.template
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ Parameters:

DatabaseName:
Type: String
AllowedPattern: "[a-zA-Z0-9_-]+"
Description: (Required) Glue catalog database name used to contain tables/views for SQL integration.
Default: 'pca'
Description: Glue catalog database name used to contain tables/views for SQL integration.

EnablePcaDashboards:
Type: String
Expand Down Expand Up @@ -848,7 +848,6 @@ Resources:
Properties:
TemplateURL: pca-ssm/cfn/ssm.template
Parameters:
StackName: !Ref 'AWS::StackName'
BulkUploadBucketName:
!If
- ShouldCreateBulkUploadBucket
Expand Down Expand Up @@ -919,8 +918,6 @@ Resources:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: pca-server/cfn/lib/python-utilities.template
Parameters:
ParentStackName: !Ref 'AWS::StackName'

BedrockBoto3Layer:
Type: AWS::CloudFormation::Stack
Expand All @@ -947,8 +944,6 @@ Resources:
Properties:
TemplateURL: pca-server/cfn/pca-server.template
Parameters:
DatabaseName: !Ref DatabaseName
ParentStackName: !Ref 'AWS::StackName'
ffmpegDownloadUrl: !Ref ffmpegDownloadUrl
CallSummarization: !Ref CallSummarization
SummarizationBedrockModelId: !Ref SummarizationBedrockModelId
Expand All @@ -971,7 +966,6 @@ Resources:
Properties:
TemplateURL: pca-ui/cfn/pca-ui.template
Parameters:
ParentStackName: !Ref 'AWS::StackName'
AdminUsername: !Ref AdminUsername
AdminEmail: !Ref AdminEmail
AllowedSignUpEmailDomain: !Ref AllowedSignUpEmailDomain
Expand Down
10 changes: 2 additions & 8 deletions pca-main.template
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ Parameters:

DatabaseName:
Type: String
AllowedPattern: "[a-zA-Z0-9_-]+"
Description: (Required) Glue catalog database name used to contain tables/views for SQL integration.
Default: 'pca'
Description: Glue catalog database name used to contain tables/views for SQL integration.

EnablePcaDashboards:
Type: String
Expand Down Expand Up @@ -1031,7 +1031,6 @@ Resources:
Properties:
TemplateURL: pca-ssm/cfn/ssm.template
Parameters:
StackName: !Ref 'AWS::StackName'
BulkUploadBucketName:
!If
- ShouldCreateBulkUploadBucket
Expand Down Expand Up @@ -1103,8 +1102,6 @@ Resources:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: pca-server/cfn/lib/python-utilities.template
Parameters:
ParentStackName: !Ref 'AWS::StackName'

BedrockBoto3Layer:
Type: AWS::CloudFormation::Stack
Expand All @@ -1131,8 +1128,6 @@ Resources:
Properties:
TemplateURL: pca-server/cfn/pca-server.template
Parameters:
DatabaseName: !Ref DatabaseName
ParentStackName: !Ref 'AWS::StackName'
ffmpegDownloadUrl: !Ref ffmpegDownloadUrl
CallSummarization: !Ref CallSummarization
SummarizationBedrockModelId: !Ref SummarizationBedrockModelId
Expand All @@ -1155,7 +1150,6 @@ Resources:
Properties:
TemplateURL: pca-ui/cfn/pca-ui.template
Parameters:
ParentStackName: !Ref 'AWS::StackName'
AdminUsername: !Ref AdminUsername
AdminEmail: !Ref AdminEmail
AllowedSignUpEmailDomain: !Ref AllowedSignUpEmailDomain
Expand Down
15 changes: 6 additions & 9 deletions pca-server/cfn/lib/boto3.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ Description: Amazon Transcribe Post Call Analytics - PCA Server - Boto3 Layer Zi
Transform: AWS::Serverless-2016-10-31

Parameters:
ParentStackName:
Type: String
Description: Name of the parent stack

# SupportFilesBucketName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: SupportFilesBucketName
SupportFilesBucketName:
Type: AWS::SSM::Parameter::Value<String>
Default: SupportFilesBucketName

Boto3ZipName:
Type: String
Expand Down Expand Up @@ -39,7 +36,7 @@ Resources:
Resource:
!Sub
- 'arn:aws:s3:::${bucket}*'
- bucket: !Sub '{{resolve:ssm:${ParentStackName}-SupportFilesBucketName}}'
- bucket: !Ref SupportFilesBucketName
Action:
- 's3:PutObject'
PolicyName: boto3ZipFunctionS3Policy
Expand All @@ -54,7 +51,7 @@ Resources:
MemorySize: 512
Environment:
Variables:
SUPPORT_FILES_BUCKET: !Sub '{{resolve:ssm:${ParentStackName}-SupportFilesBucketName}}'
SUPPORT_FILES_BUCKET: !Ref SupportFilesBucketName
BOTO3_ZIP_NAME: !Ref Boto3ZipName
Code:
ZipFile: |
Expand Down Expand Up @@ -127,7 +124,7 @@ Resources:
DependsOn: boto3Zip
Properties:
Content:
S3Bucket: !Sub '{{resolve:ssm:${ParentStackName}-SupportFilesBucketName}}'
S3Bucket: !Ref SupportFilesBucketName
S3Key: !Ref Boto3ZipName

Outputs:
Expand Down
68 changes: 19 additions & 49 deletions pca-server/cfn/lib/bulk.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ Description: Amazon Transcribe Post Call Analytics - PCA Server - BulkImport Sta
Transform: AWS::Serverless-2016-10-31

Parameters:
ParentStackName:
Type: String
Description: Name of the parent stack
BulkUploadStepFunctionName:
Type: AWS::SSM::Parameter::Value<String>
Default: BulkUploadStepFunctionName

# BulkUploadStepFunctionName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: BulkUploadStepFunctionName

# BulkUploadBucketName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: BulkUploadBucket

# InputBucketName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: InputBucketName
BulkUploadBucketName:
Type: AWS::SSM::Parameter::Value<String>
Default: BulkUploadBucket

InputBucketName:
Type: AWS::SSM::Parameter::Value<String>
Default: InputBucketName

Globals:
Function:
Expand All @@ -41,17 +37,8 @@ Resources:
- s3:ListBucket
- s3:GetObject
Resource:
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-BulkUploadBucket}}'
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-BulkUploadBucket}}'
- '/*'
#- !Sub arn:aws:s3:::${BulkUploadBucketName}
#- !Sub arn:aws:s3:::${BulkUploadBucketName}/*
- !Sub arn:aws:s3:::${BulkUploadBucketName}
- !Sub arn:aws:s3:::${BulkUploadBucketName}/*
- Statement:
- Sid: SSMGetParameterPolicy
Effect: Allow
Expand All @@ -75,24 +62,10 @@ Resources:
- s3:PutObject
- s3:DeleteObject
Resource:
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-BulkUploadBucket}}'
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-BulkUploadBucket}}'
- '/*'
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-InputBucketName}}'
- !Join
- ''
- - 'arn:aws:s3:::'
- !Sub '{{resolve:ssm:${ParentStackName}-InputBucketName}}'
- '/*'
- !Sub arn:aws:s3:::${BulkUploadBucketName}
- !Sub arn:aws:s3:::${BulkUploadBucketName}/*
- !Sub arn:aws:s3:::${InputBucketName}
- !Sub arn:aws:s3:::${InputBucketName}/*

BulkQueueSpace:
Type: "AWS::Serverless::Function"
Expand All @@ -105,11 +78,8 @@ Resources:

LogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Join
- ''
- - '/aws/vendedlogs/'
- !Sub "{{resolve:ssm:${ParentStackName}-BulkUploadStepFunctionName}}"
Properties:
LogGroupName: !Sub '/aws/vendedlogs/${BulkUploadStepFunctionName}'
RetentionInDays: 90

Role:
Expand Down Expand Up @@ -149,7 +119,7 @@ Resources:
StateMachine:
Type: "AWS::StepFunctions::StateMachine"
Properties:
StateMachineName: !Sub "{{resolve:ssm:${ParentStackName}-BulkUploadStepFunctionName}}"
StateMachineName: !Ref BulkUploadStepFunctionName
DefinitionS3Location: ./bulk-definition.json
DefinitionSubstitutions:
BulkFilesCountArn: !GetAtt BulkFilesCount.Arn
Expand Down
13 changes: 5 additions & 8 deletions pca-server/cfn/lib/ffmpeg.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ Description: Amazon Transcribe Post Call Analytics - PCA Server - FFMPEG Downloa
Transform: AWS::Serverless-2016-10-31

Parameters:
ParentStackName:
Type: String
Description: Name of the parent stack

# SupportFilesBucketName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: SupportFilesBucketName
SupportFilesBucketName:
Type: AWS::SSM::Parameter::Value<String>
Default: SupportFilesBucketName

FFMPEGZipName:
Type: String
Expand Down Expand Up @@ -45,7 +42,7 @@ Resources:
Resource:
!Sub
- 'arn:aws:s3:::${bucket}*'
- bucket: !Sub '{{resolve:ssm:${ParentStackName}-SupportFilesBucketName}}'
- bucket: !Ref SupportFilesBucketName
Action:
- 's3:PutObject'
PolicyName: ffmpegZipFunctionS3Policy
Expand All @@ -61,7 +58,7 @@ Resources:
Environment:
Variables:
FFMPEG_DOWNLOAD_URL: !Ref ffmpegDownloadUrl
SUPPORT_FILES_BUCKET: !Sub '{{resolve:ssm:${ParentStackName}-SupportFilesBucketName}}'
SUPPORT_FILES_BUCKET: !Ref SupportFilesBucketName
FFMPEG_ZIP_NAME: !Ref FFMPEGZipName
Code:
ZipFile: |
Expand Down
45 changes: 13 additions & 32 deletions pca-server/cfn/lib/glue-database.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ Description: Amazon Transcribe Post Call Analytics - PCA Server - Glue Catalog D
Transform: AWS::Serverless-2016-10-31

Parameters:
ParentStackName:
Type: String
Description: Name of the parent stack

# DatabaseName:
# Type: AWS::SSM::Parameter::Value<String>
#Default: DatabaseName
DatabaseName:
Type: AWS::SSM::Parameter::Value<String>
Default: DatabaseName

# DatabaseName:
# Type: String
# Description: Glue catalog database name used to contain tables/views for SQL integration.

# OutputBucketName:
# Type: AWS::SSM::Parameter::Value<String>
# Default: OutputBucketName
#
# OutputBucketParsedResults:
# Type: AWS::SSM::Parameter::Value<String>
# Default: OutputBucketParsedResults
OutputBucketName:
Type: AWS::SSM::Parameter::Value<String>
Default: OutputBucketName

OutputBucketParsedResults:
Type: AWS::SSM::Parameter::Value<String>
Default: OutputBucketParsedResults

Resources:

Expand All @@ -33,14 +26,8 @@ Resources:
CatalogId: !Ref AWS::AccountId
DatabaseInput:
Description: Post Call Analytics
LocationUri: !Join
- ''
- - 's3://'
- !Sub '{{resolve:ssm:${ParentStackName}-OutputBucketName}}'
- '/'
- !Sub '{{resolve:ssm:${ParentStackName}-OutputBucketParsedResults}}'
- '/'
Name: !Sub "{{resolve:ssm:${ParentStackName}-DatabaseName}}"
LocationUri: !Sub 's3://${OutputBucketName}/${OutputBucketParsedResults}/'
Name: !Ref DatabaseName

ParsedResultsTable:
Type: AWS::Glue::Table
Expand All @@ -61,13 +48,7 @@ Resources:
Compressed: false
NumberOfBuckets: -1
InputFormat: org.apache.hadoop.mapred.TextInputFormat
Location: !Join
- ''
- - 's3://'
- !Sub '{{resolve:ssm:${ParentStackName}-OutputBucketName}}'
- '/'
- !Sub '{{resolve:ssm:${ParentStackName}-OutputBucketParsedResults}}'
- '/'
Location: !Sub 's3://${OutputBucketName}/${OutputBucketParsedResults}/'
OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
SerdeInfo:
Name: JSON
Expand Down
Loading