diff --git a/packages/cdk/lib/transcription-service.ts b/packages/cdk/lib/transcription-service.ts index 37eae73..cb5662d 100644 --- a/packages/cdk/lib/transcription-service.ts +++ b/packages/cdk/lib/transcription-service.ts @@ -77,6 +77,11 @@ import { Topic } from 'aws-cdk-lib/aws-sns'; import { Queue } from 'aws-cdk-lib/aws-sqs'; import { JsonPath } from 'aws-cdk-lib/aws-stepfunctions'; +const topicArnToName = (topicArn: string) => { + const split = topicArn.split(':'); + return split[split.length - 1] ?? ''; +}; + export class TranscriptionService extends GuStack { constructor(scope: App, id: string, props: GuStackProps) { super(scope, id, props); @@ -531,6 +536,8 @@ export class TranscriptionService extends GuStack { }, ).valueAsString; + const alarmTopicName = topicArnToName(alarmTopicArn); + const mediaDownloadTask = new GuEcsTask(this, 'media-download-task', { app: mediaDownloadApp, vpc, @@ -693,6 +700,14 @@ export class TranscriptionService extends GuStack { handler: 'index.outputHandler', runtime: Runtime.NODEJS_20_X, app: `${APP_NAME}-output-handler`, + errorPercentageMonitoring: + this.stage === 'PROD' + ? { + toleratedErrorPercentage: 0, + noMonitoring: false, + snsTopicName: alarmTopicName, + } + : undefined, }, ); @@ -737,6 +752,14 @@ export class TranscriptionService extends GuStack { ephemeralStorageSize: Size.mebibytes(10240), memorySize: 2048, timeout: Duration.seconds(900), + errorPercentageMonitoring: + this.stage === 'PROD' + ? { + toleratedErrorPercentage: 0, + noMonitoring: false, + snsTopicName: alarmTopicName, + } + : undefined, }, ); diff --git a/packages/client/src/components/ExportForm.tsx b/packages/client/src/components/ExportForm.tsx index d294d27..36ec356 100644 --- a/packages/client/src/components/ExportForm.tsx +++ b/packages/client/src/components/ExportForm.tsx @@ -68,11 +68,11 @@ const statusToMessage = (status: RequestStatus): string => { case RequestStatus.CreatingFolder: return "Export in progress... If nothing happens, make sure that your browser isn't blocking pop-ups."; case RequestStatus.TranscriptExportInProgress: - return 'Transcript export in progress. Links to your files will soon appear below.'; + return 'Export in progress. Links to your files will soon appear below.'; case RequestStatus.InProgress: - return `Export in progress. See below for links to your transcript files. Source media will take a little - longer - you can stay on this page or click the button to open the google drive folder and wait - for it to appear there.`; + return `Export in progress. See below for links to your transcript files. Source media may take several + minutes - you can stay on this page or click the button to open the google drive folder and wait + for it to appear there.`; case RequestStatus.Ready: default: return '';