From 3b16a048c1200803a67bd20af103deaa590fb870 Mon Sep 17 00:00:00 2001 From: rex Date: Sat, 6 Nov 2021 18:34:49 -0400 Subject: [PATCH 1/5] feat: move tables to storage --- .../development-EncodeService.template.json | 1166 +--------- ...evelopment-TranscribeService.template.json | 390 ++-- cdk.out/manifest.json | 1314 ++--------- cdk.out/tree.json | 1957 +++-------------- infrastructure/config.json | 4 + infrastructure/infrastructure.js | 7 + infrastructure/services/encode/index.js | 1 - infrastructure/services/transcribe/index.js | 15 +- .../utils/create-lambda-function.js | 2 +- .../transcribe/extract-audio/index.ts | 175 +- yarn.lock | 391 +--- 11 files changed, 963 insertions(+), 4459 deletions(-) diff --git a/cdk.out/development-EncodeService.template.json b/cdk.out/development-EncodeService.template.json index 1a24a9b..38d24b5 100644 --- a/cdk.out/development-EncodeService.template.json +++ b/cdk.out/development-EncodeService.template.json @@ -1,1095 +1,9 @@ { "Resources": { - "VideoInputBucket940F4F43": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain", - "Metadata": { - "aws:cdk:path": "development-EncodeService/VideoInputBucket/Resource" - } - }, - "VideoInputBucketNotifications76FF7081": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "VideoInputBucket940F4F43" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "ExtractAudioLambda12696EC4", - "Arn" - ] - } - } - ] - } - }, - "DependsOn": [ - "VideoInputBucketAllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B86D7DD34" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/VideoInputBucket/Notifications/Resource" - } - }, - "VideoInputBucketAllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B86D7DD34": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ExtractAudioLambda12696EC4", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B" - } - }, - "FFMPEGformLayer787129EE": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" - } - ] - } - ] - } - ] - ] - } - }, - "CompatibleRuntimes": [ - "nodejs12.x" - ], - "Description": "Binary file of ffmpeg" - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/FFMPEGformLayer/Resource", - "aws:asset:path": "asset.c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c.zip", - "aws:asset:property": "Content" - } - }, - "ExtractAudioLambdaServiceRole0AE87B8E": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioLambda/ServiceRole/Resource" - } - }, - "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", - "Roles": [ - { - "Ref": "ExtractAudioLambdaServiceRole0AE87B8E" - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource" - } - }, - "ExtractAudioLambda12696EC4": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3Bucket6469C901" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "ExtractAudioLambdaServiceRole0AE87B8E", - "Arn" - ] - }, - "Environment": { - "Variables": { - "STAGE": "development" - } - }, - "FunctionName": "extraAudioLambda", - "Handler": "extract-audio.handler", - "MemorySize": 521, - "Runtime": "nodejs10.x", - "Timeout": 60 - }, - "DependsOn": [ - "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", - "ExtractAudioLambdaServiceRole0AE87B8E" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioLambda/Resource", - "aws:asset:path": "asset.02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a.zip", - "aws:asset:property": "Code" - } - }, - "ExtractAudioBucket197901EB": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain", - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioBucket/Resource" - } - }, - "ExtractAudioBucketNotificationsF31E573B": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "ExtractAudioBucket197901EB" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "sendTranscriptionLambda653766BA", - "Arn" - ] - } - } - ] - } - }, - "DependsOn": [ - "ExtractAudioBucketAllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA78FA674F1" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioBucket/Notifications/Resource" - } - }, - "ExtractAudioBucketAllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA78FA674F1": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "sendTranscriptionLambda653766BA", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ExtractAudioBucket/AllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA7" - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource" - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "Roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource" - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", - "Code": { - "ZipFile": "exports.handler = (event, context) => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies\n const s3 = new (require('aws-sdk').S3)();\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const https = require('https');\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const url = require('url');\n log(JSON.stringify(event, undefined, 2));\n const props = event.ResourceProperties;\n if (event.RequestType === 'Delete') {\n props.NotificationConfiguration = {}; // this is how you clean out notifications\n }\n const req = {\n Bucket: props.BucketName,\n NotificationConfiguration: props.NotificationConfiguration,\n };\n return s3.putBucketNotificationConfiguration(req, (err, data) => {\n log({ err, data });\n if (err) {\n return submitResponse('FAILED', err.message + `\\nMore information in CloudWatch Log Stream: ${context.logStreamName}`);\n }\n else {\n return submitResponse('SUCCESS');\n }\n });\n function log(obj) {\n console.error(event.RequestId, event.StackId, event.LogicalResourceId, obj);\n }\n // eslint-disable-next-line max-len\n // adapted from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-cfnresponsemodule\n // to allow sending an error message as a reason.\n function submitResponse(responseStatus, reason) {\n const responseBody = JSON.stringify({\n Status: responseStatus,\n Reason: reason || 'See the details in CloudWatch Log Stream: ' + context.logStreamName,\n PhysicalResourceId: event.PhysicalResourceId || event.LogicalResourceId,\n StackId: event.StackId,\n RequestId: event.RequestId,\n LogicalResourceId: event.LogicalResourceId,\n NoEcho: false,\n });\n log({ responseBody });\n const parsedUrl = url.parse(event.ResponseURL);\n const options = {\n hostname: parsedUrl.hostname,\n port: 443,\n path: parsedUrl.path,\n method: 'PUT',\n headers: {\n 'content-type': '',\n 'content-length': responseBody.length,\n },\n };\n const request = https.request(options, (r) => {\n log({ statusCode: r.statusCode, statusMessage: r.statusMessage });\n context.done();\n });\n request.on('error', (error) => {\n log({ sendError: error });\n context.done();\n });\n request.write(responseBody);\n request.end();\n }\n};" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "Arn" - ] - }, - "Runtime": "nodejs12.x", - "Timeout": 300 - }, - "DependsOn": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource" - } - }, - "sendTranscriptionLambdaServiceRole094A4526": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/sendTranscriptionLambda/ServiceRole/Resource" - } - }, - "sendTranscriptionLambda653766BA": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3Bucket0C7B666B" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "sendTranscriptionLambdaServiceRole094A4526", - "Arn" - ] - }, - "Environment": { - "Variables": { - "STAGE": "development" - } - }, - "FunctionName": "sendTranscriptionLambda", - "Handler": "send-transcribe-job.handler", - "MemorySize": 521, - "Runtime": "nodejs10.x", - "Timeout": 60 - }, - "DependsOn": [ - "sendTranscriptionLambdaServiceRole094A4526" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/sendTranscriptionLambda/Resource", - "aws:asset:path": "asset.9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c.zip", - "aws:asset:property": "Code" - } - }, - "ApiGatewayForApiServiceF97F9386": { - "Type": "AWS::ApiGateway::RestApi", - "Properties": { - "FailOnWarnings": true, - "Name": "assembly-development-webhook" - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Resource" - } - }, - "ApiGatewayForApiServiceCloudWatchRole21D61FAC": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/CloudWatchRole/Resource" - } - }, - "ApiGatewayForApiServiceAccount12973782": { - "Type": "AWS::ApiGateway::Account", - "Properties": { - "CloudWatchRoleArn": { - "Fn::GetAtt": [ - "ApiGatewayForApiServiceCloudWatchRole21D61FAC", - "Arn" - ] - } - }, - "DependsOn": [ - "ApiGatewayForApiServiceF97F9386" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Account" - } - }, - "ApiGatewayForApiServiceDeploymentB7C1F9F3b6edd3162f55477a4db20b005d94fb8d": { - "Type": "AWS::ApiGateway::Deployment", - "Properties": { - "RestApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "Description": "Automatically created by the RestApi construct" - }, - "DependsOn": [ - "ApiGatewayForApiServicewebhookGET094EEC39", - "ApiGatewayForApiServicewebhookPOSTA353740B", - "ApiGatewayForApiServicewebhookE33C8AAD" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Deployment/Resource" - } - }, - "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A": { - "Type": "AWS::ApiGateway::Stage", - "Properties": { - "RestApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "DeploymentId": { - "Ref": "ApiGatewayForApiServiceDeploymentB7C1F9F3b6edd3162f55477a4db20b005d94fb8d" - }, - "StageName": "development" - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/DeploymentStage.development/Resource" - } - }, - "ApiGatewayForApiServicewebhookE33C8AAD": { - "Type": "AWS::ApiGateway::Resource", - "Properties": { - "ParentId": { - "Fn::GetAtt": [ - "ApiGatewayForApiServiceF97F9386", - "RootResourceId" - ] - }, - "PathPart": "webhook", - "RestApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/Resource" - } - }, - "ApiGatewayForApiServicewebhookGETApiPermissiondevelopmentEncodeServiceApiGatewayForApiService7F461E87GETwebhookA35D73C7": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/", - { - "Ref": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A" - }, - "/GET/webhook" - ] - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook" - } - }, - "ApiGatewayForApiServicewebhookGETApiPermissionTestdevelopmentEncodeServiceApiGatewayForApiService7F461E87GETwebhook3F21A025": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/test-invoke-stage/GET/webhook" - ] - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook" - } - }, - "ApiGatewayForApiServicewebhookGET094EEC39": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "GET", - "ResourceId": { - "Ref": "ApiGatewayForApiServicewebhookE33C8AAD" - }, - "RestApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/Resource" - } - }, - "ApiGatewayForApiServicewebhookPOSTApiPermissiondevelopmentEncodeServiceApiGatewayForApiService7F461E87POSTwebhookFC378AD1": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/", - { - "Ref": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A" - }, - "/POST/webhook" - ] - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook" - } - }, - "ApiGatewayForApiServicewebhookPOSTApiPermissionTestdevelopmentEncodeServiceApiGatewayForApiService7F461E87POSTwebhookBCE7B76D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/test-invoke-stage/POST/webhook" - ] - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook" - } - }, - "ApiGatewayForApiServicewebhookPOSTA353740B": { - "Type": "AWS::ApiGateway::Method", - "Properties": { - "HttpMethod": "POST", - "ResourceId": { - "Ref": "ApiGatewayForApiServicewebhookE33C8AAD" - }, - "RestApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "AuthorizationType": "NONE", - "Integration": { - "IntegrationHttpMethod": "POST", - "Type": "AWS_PROXY", - "Uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "/invocations" - ] - ] - } - } - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/Resource" - } - }, - "assemblyWebhookLambdaServiceRoleA8F8BA14": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/assemblyWebhookLambda/ServiceRole/Resource" - } - }, - "assemblyWebhookLambdaServiceRoleDefaultPolicyA3CB1869": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "VideoTranscriptionBucket53EBD46C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "VideoTranscriptionBucket53EBD46C", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "assemblyWebhookLambdaServiceRoleDefaultPolicyA3CB1869", - "Roles": [ - { - "Ref": "assemblyWebhookLambdaServiceRoleA8F8BA14" - } - ] - }, - "Metadata": { - "aws:cdk:path": "development-EncodeService/assemblyWebhookLambda/ServiceRole/DefaultPolicy/Resource" - } - }, - "assemblyWebhookLambda2AE37EC2": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3BucketAD7A2B93" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "assemblyWebhookLambdaServiceRoleA8F8BA14", - "Arn" - ] - }, - "Environment": { - "Variables": { - "STAGE": "development" - } - }, - "FunctionName": "assemblyWebhookLambda", - "Handler": "assembly-webhook.handler", - "MemorySize": 521, - "Runtime": "nodejs10.x", - "Timeout": 60 - }, - "DependsOn": [ - "assemblyWebhookLambdaServiceRoleDefaultPolicyA3CB1869", - "assemblyWebhookLambdaServiceRoleA8F8BA14" - ], - "Metadata": { - "aws:cdk:path": "development-EncodeService/assemblyWebhookLambda/Resource", - "aws:asset:path": "asset.a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3.zip", - "aws:asset:property": "Code" - } - }, - "VideoTranscriptionBucket53EBD46C": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain", - "Metadata": { - "aws:cdk:path": "development-EncodeService/VideoTranscriptionBucket/Resource" - } - }, "CDKMetadata": { "Type": "AWS::CDK::Metadata", "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAAE1WQwU7DMAyGn2X3NFtVEFe6IU4gpiJxD6npsjZJFTtMVZV3J0nXiZ38/bZj/3HJy90T322exQUL2fbbWVoHfP4kIXt2sAbJeUns8GMaQOudBFYjAsWGTpmO3bKx4yic0EDgkvjwNPr8ME5pFSlrAktbZqz4vPeyh1xdKLBB6O9W8DnNAacVYnzB3sQE7gtcFrF0p1+9kXQtrBwYVoVIDpFno0wJzefGDtlijkc7KDllx5mir1F1guAiptgKSPWorl9esZbSekPsBcbBThpMNv9PpYPkFQusd9kLhLsj3fgd6GTblFoohMCMbYGfcftbPvDykVebMypVuLhYaeDNEv8A8Gx8obQBAAA=" + "Analytics": "v2:deflate64:H4sIAAAAAAAAEzPUMzQw1zNQdEgsL9ZNTsnWT84vStWrDi5JTM7Wcc7PKy4pKk0u0XFOywtKLc4vLUpOBbGBEimZJZn5ebU6efkpqXpZxfplhiZ6hqZ6xopZxZmZukWleSWZual6QRAaACWmv2xmAAAA" }, "Metadata": { "aws:cdk:path": "development-EncodeService/CDKMetadata/Default" @@ -1097,84 +11,6 @@ "Condition": "CDKMetadataAvailable" } }, - "Parameters": { - "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570": { - "Type": "String", - "Description": "S3 bucket for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" - }, - "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B": { - "Type": "String", - "Description": "S3 key for asset version \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" - }, - "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E": { - "Type": "String", - "Description": "Artifact hash for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" - }, - "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3Bucket6469C901": { - "Type": "String", - "Description": "S3 bucket for asset \"02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a\"" - }, - "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A": { - "Type": "String", - "Description": "S3 key for asset version \"02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a\"" - }, - "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aArtifactHashE258F64E": { - "Type": "String", - "Description": "Artifact hash for asset \"02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a\"" - }, - "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3Bucket0C7B666B": { - "Type": "String", - "Description": "S3 bucket for asset \"9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c\"" - }, - "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB": { - "Type": "String", - "Description": "S3 key for asset version \"9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c\"" - }, - "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cArtifactHashA7AAFCE1": { - "Type": "String", - "Description": "Artifact hash for asset \"9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c\"" - }, - "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3BucketAD7A2B93": { - "Type": "String", - "Description": "S3 bucket for asset \"a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3\"" - }, - "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B": { - "Type": "String", - "Description": "S3 key for asset version \"a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3\"" - }, - "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3ArtifactHashF630AF8E": { - "Type": "String", - "Description": "Artifact hash for asset \"a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3\"" - } - }, - "Outputs": { - "ApiGatewayForApiServiceEndpointE631541E": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - ".execute-api.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A" - }, - "/" - ] - ] - } - } - }, "Conditions": { "CDKMetadataAvailable": { "Fn::Or": [ diff --git a/cdk.out/development-TranscribeService.template.json b/cdk.out/development-TranscribeService.template.json index b2f59d3..6e26c81 100644 --- a/cdk.out/development-TranscribeService.template.json +++ b/cdk.out/development-TranscribeService.template.json @@ -1,17 +1,125 @@ { "Resources": { - "encodeCaptionsQueueEFD23B45": { - "Type": "AWS::SQS::Queue", + "VideoInputBucketNotifications76FF7081": { + "Type": "Custom::S3BucketNotifications", "Properties": { - "VisibilityTimeout": 180 + "ServiceToken": { + "Fn::GetAtt": [ + "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", + "Arn" + ] + }, + "BucketName": "development-storage-videoinputbucket940f4f43-1du1ixen5jp8u", + "NotificationConfiguration": { + "LambdaFunctionConfigurations": [ + { + "Events": [ + "s3:ObjectCreated:*" + ], + "LambdaFunctionArn": { + "Fn::GetAtt": [ + "ExtractAudioLambda12696EC4", + "Arn" + ] + } + } + ] + }, + "Managed": false }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete", + "DependsOn": [ + "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A0588AE5F" + ], "Metadata": { - "aws:cdk:path": "development-TranscribeService/encodeCaptionsQueue/Resource" + "aws:cdk:path": "development-TranscribeService/VideoInputBucket/Notifications/Resource" } }, - "encodeCaptionsLambdaServiceRoleCE3B5A0B": { + "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A0588AE5F": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ExtractAudioLambda12696EC4", + "Arn" + ] + }, + "Principal": "s3.amazonaws.com", + "SourceAccount": { + "Ref": "AWS::AccountId" + }, + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] + ] + } + }, + "Metadata": { + "aws:cdk:path": "development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A" + } + }, + "ffmpeglayer406486B5": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" + } + ] + } + ] + } + ] + ] + } + }, + "CompatibleRuntimes": [ + "nodejs10.x", + "nodejs12.x", + "nodejs14.x" + ], + "Description": "ffmpeg use for lambda" + }, + "Metadata": { + "aws:cdk:path": "development-TranscribeService/ffmpeg-layer/Resource", + "aws:asset:path": "asset.c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c.zip", + "aws:asset:property": "Content" + } + }, + "ExtractAudioLambdaServiceRole0AE87B8E": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -42,50 +150,108 @@ ] }, "Metadata": { - "aws:cdk:path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole/Resource" + "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/Resource" } }, - "encodeCaptionsLambdaServiceRoleDefaultPolicy3055993F": { + "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { "Statement": [ { "Action": [ - "sqs:ReceiveMessage", - "sqs:ChangeMessageVisibility", - "sqs:GetQueueUrl", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes" + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" ], "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "encodeCaptionsQueueEFD23B45", - "Arn" - ] - } + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject*", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz/*" + ] + ] + } + ] } ], "Version": "2012-10-17" }, - "PolicyName": "encodeCaptionsLambdaServiceRoleDefaultPolicy3055993F", + "PolicyName": "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", "Roles": [ { - "Ref": "encodeCaptionsLambdaServiceRoleCE3B5A0B" + "Ref": "ExtractAudioLambdaServiceRole0AE87B8E" } ] }, "Metadata": { - "aws:cdk:path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole/DefaultPolicy/Resource" + "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource" } }, - "encodeCaptionsLambdaE696604A": { + "ExtractAudioLambda12696EC4": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3Bucket9E8432EF" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE" }, "S3Key": { "Fn::Join": [ @@ -98,7 +264,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" } ] } @@ -111,7 +277,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" } ] } @@ -123,116 +289,63 @@ }, "Role": { "Fn::GetAtt": [ - "encodeCaptionsLambdaServiceRoleCE3B5A0B", + "ExtractAudioLambdaServiceRole0AE87B8E", "Arn" ] }, "Environment": { "Variables": { - "STAGE": "development" + "STAGE": "development", + "NODE_ENV": "development", + "SUPABASE_API_URL": "https://jtlvnnrxubgfwmzltxon.supabase.co", + "SUPABASE_API_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzNDQwOTk2NSwiZXhwIjoxOTQ5OTg1OTY1fQ.-i-Jl1gw1MM2KAz7NZwLrADMpqtBmY38t4_oHR6KGeM", + "VIDEO_INPUT_BUCKET": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] + ] + }, + "EXTRACTED_VIDEO_AUDIO_BUCKET": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" + ] + ] + } } }, - "FunctionName": "encodeCaptionsLambda", - "Handler": "encode-captions-for-export.handler", + "FunctionName": "extractAudioLambda", + "Handler": "extract-audio.handler", + "Layers": [ + { + "Ref": "ffmpeglayer406486B5" + } + ], "MemorySize": 521, - "Runtime": "nodejs10.x", + "Runtime": "nodejs12.x", "Timeout": 60 }, "DependsOn": [ - "encodeCaptionsLambdaServiceRoleDefaultPolicy3055993F", - "encodeCaptionsLambdaServiceRoleCE3B5A0B" + "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", + "ExtractAudioLambdaServiceRole0AE87B8E" ], "Metadata": { - "aws:cdk:path": "development-TranscribeService/encodeCaptionsLambda/Resource", - "aws:asset:path": "asset.d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb.zip", + "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/Resource", + "aws:asset:path": "asset.e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14.zip", "aws:asset:property": "Code" } }, - "encodeCaptionsLambdaSqsEventSourcedevelopmentTranscribeServiceencodeCaptionsQueue48B8AA4B4A0DBF97": { - "Type": "AWS::Lambda::EventSourceMapping", - "Properties": { - "FunctionName": { - "Ref": "encodeCaptionsLambdaE696604A" - }, - "EventSourceArn": { - "Fn::GetAtt": [ - "encodeCaptionsQueueEFD23B45", - "Arn" - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-TranscribeService/encodeCaptionsLambda/SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B/Resource" - } - }, - "VideoInputBucket940F4F43": { - "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain", - "Metadata": { - "aws:cdk:path": "development-TranscribeService/VideoInputBucket/Resource" - } - }, - "VideoInputBucketNotifications76FF7081": { - "Type": "Custom::S3BucketNotifications", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "Arn" - ] - }, - "BucketName": { - "Ref": "VideoInputBucket940F4F43" - }, - "NotificationConfiguration": { - "LambdaFunctionConfigurations": [ - { - "Events": [ - "s3:ObjectCreated:*" - ], - "LambdaFunctionArn": { - "Fn::GetAtt": [ - "encodeCaptionsLambdaE696604A", - "Arn" - ] - } - } - ] - } - }, - "DependsOn": [ - "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF1776EBDDA8" - ], - "Metadata": { - "aws:cdk:path": "development-TranscribeService/VideoInputBucket/Notifications/Resource" - } - }, - "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF1776EBDDA8": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "encodeCaptionsLambdaE696604A", - "Arn" - ] - }, - "Principal": "s3.amazonaws.com", - "SourceAccount": { - "Ref": "AWS::AccountId" - }, - "SourceArn": { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] - } - }, - "Metadata": { - "aws:cdk:path": "development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF17" - } - }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC": { "Type": "AWS::IAM::Role", "Properties": { @@ -276,6 +389,11 @@ "Action": "s3:PutBucketNotification", "Effect": "Allow", "Resource": "*" + }, + { + "Action": "s3:GetBucketNotification", + "Effect": "Allow", + "Resource": "*" } ], "Version": "2012-10-17" @@ -296,7 +414,7 @@ "Properties": { "Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)", "Code": { - "ZipFile": "exports.handler = (event, context) => {\n // eslint-disable-next-line @typescript-eslint/no-require-imports, import/no-extraneous-dependencies\n const s3 = new (require('aws-sdk').S3)();\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const https = require('https');\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const url = require('url');\n log(JSON.stringify(event, undefined, 2));\n const props = event.ResourceProperties;\n if (event.RequestType === 'Delete') {\n props.NotificationConfiguration = {}; // this is how you clean out notifications\n }\n const req = {\n Bucket: props.BucketName,\n NotificationConfiguration: props.NotificationConfiguration,\n };\n return s3.putBucketNotificationConfiguration(req, (err, data) => {\n log({ err, data });\n if (err) {\n return submitResponse('FAILED', err.message + `\\nMore information in CloudWatch Log Stream: ${context.logStreamName}`);\n }\n else {\n return submitResponse('SUCCESS');\n }\n });\n function log(obj) {\n console.error(event.RequestId, event.StackId, event.LogicalResourceId, obj);\n }\n // eslint-disable-next-line max-len\n // adapted from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-cfnresponsemodule\n // to allow sending an error message as a reason.\n function submitResponse(responseStatus, reason) {\n const responseBody = JSON.stringify({\n Status: responseStatus,\n Reason: reason || 'See the details in CloudWatch Log Stream: ' + context.logStreamName,\n PhysicalResourceId: event.PhysicalResourceId || event.LogicalResourceId,\n StackId: event.StackId,\n RequestId: event.RequestId,\n LogicalResourceId: event.LogicalResourceId,\n NoEcho: false,\n });\n log({ responseBody });\n const parsedUrl = url.parse(event.ResponseURL);\n const options = {\n hostname: parsedUrl.hostname,\n port: 443,\n path: parsedUrl.path,\n method: 'PUT',\n headers: {\n 'content-type': '',\n 'content-length': responseBody.length,\n },\n };\n const request = https.request(options, (r) => {\n log({ statusCode: r.statusCode, statusMessage: r.statusMessage });\n context.done();\n });\n request.on('error', (error) => {\n log({ sendError: error });\n context.done();\n });\n request.write(responseBody);\n request.end();\n }\n};" + "ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n\n # find external notifications\n external_notifications = find_external_notifications(bucket, stack_id)\n\n # if delete, that's all we need\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n # otherwise, merge external with incoming config and augment with id\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n return notifications\n\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n # if the notification was created by us, we know what id to expect\n # so we can filter by it.\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n return external_notifications\n\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n" }, "Handler": "index.handler", "Role": { @@ -305,7 +423,7 @@ "Arn" ] }, - "Runtime": "nodejs12.x", + "Runtime": "python3.7", "Timeout": 300 }, "DependsOn": [ @@ -319,7 +437,7 @@ "CDKMetadata": { "Type": "AWS::CDK::Metadata", "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAAE22PwW7CMAyGn4V7aqhg4roNbbdJpTxBSA0ybRIWJ0woyrvTGGm77OTP/n/Z/ltoV1tYLV71DzdmGJfZ+ICQD1GbUb0xY5zxTO6semSfgkG1845jSCaq3cl1OmiLEUNt/iwnN7sGiuRdUXV35m+GvE+YRBUoatL2OGjIn8mZ6q3SL3/c0MWDLPzS12v9YZb/n3YYLDHLOdIWcu8nOSS18xOZu/iEiuJ1o2s4Bsk495DfkxlRQj2plKKcHxAuvLy1G2hfYL24MFETkotkEfpnfQD+Pax/RQEAAA==" + "Analytics": "v2:deflate64:H4sIAAAAAAAAE41QwWrDMAz9lt4VNSEbu24t7LRDSWF3zVGLm9gGy14pxv++2F0Zue2k93iS3pM6TF37gu3mla7SqHHaJuU8YzoGUhO8iXBY4FnbMwwsLnrFsHdWgo8qwP5kD+TJcGBfyF/LyS5dow7a2Qxld5rJfI2EqcywN1pk0eCDbuw/2VeySCv+Hq0Kv8IDZ5C+oZJLsMYDTQbT4ObqWuvBzVrdarqKcs7Q9e3qzJpJetxFNXHYkfC/FsH9PasXPK4uNtaNjBfZfndP2D1jv7mI1o2PNmjDONzrD/dXZIB2AQAA" }, "Metadata": { "aws:cdk:path": "development-TranscribeService/CDKMetadata/Default" @@ -328,17 +446,29 @@ } }, "Parameters": { - "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3Bucket9E8432EF": { + "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570": { + "Type": "String", + "Description": "S3 bucket for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" + }, + "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B": { + "Type": "String", + "Description": "S3 key for asset version \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" + }, + "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E": { + "Type": "String", + "Description": "Artifact hash for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" + }, + "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE": { "Type": "String", - "Description": "S3 bucket for asset \"d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb\"" + "Description": "S3 bucket for asset \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" }, - "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28": { + "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49": { "Type": "String", - "Description": "S3 key for asset version \"d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb\"" + "Description": "S3 key for asset version \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" }, - "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbArtifactHashEF6BA326": { + "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513": { "Type": "String", - "Description": "Artifact hash for asset \"d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb\"" + "Description": "Artifact hash for asset \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" } }, "Conditions": { diff --git a/cdk.out/manifest.json b/cdk.out/manifest.json index 90f3f0c..cc9c328 100644 --- a/cdk.out/manifest.json +++ b/cdk.out/manifest.json @@ -25,7 +25,7 @@ "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", "new Table (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-dynamodb/lib/table.js:482:23)", "new Dynamo (/Users/rexpeterson/work/captionease-backend/infrastructure/central/dynamodb.js:8:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:29:1)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:30:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -42,7 +42,7 @@ "trace": [ "new Table (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-dynamodb/lib/table.js:456:22)", "new Dynamo (/Users/rexpeterson/work/captionease-backend/infrastructure/central/dynamodb.js:8:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:29:1)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:30:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -64,7 +64,7 @@ "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -86,7 +86,7 @@ "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -99,68 +99,22 @@ }, "displayName": "development-Dynamo" }, - "development-EncodeService": { + "development-Storage": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "development-EncodeService.template.json", + "templateFile": "development-Storage.template.json", "validateOnSynth": false }, "metadata": { - "/development-EncodeService": [ - { - "type": "aws:cdk:asset", - "data": { - "path": "asset.c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c.zip", - "id": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "packaging": "file", - "sourceHash": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "s3BucketParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", - "s3KeyParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", - "artifactHashParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E" - }, - "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:29:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - }, + "/development-Storage/VideoInputBucket/Resource": [ { - "type": "aws:cdk:asset", - "data": { - "path": "asset.02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a.zip", - "id": "02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a", - "packaging": "file", - "sourceHash": "02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a", - "s3BucketParameter": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3Bucket6469C901", - "s3KeyParameter": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A", - "artifactHashParameter": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aArtifactHashE258F64E" - }, + "type": "aws:cdk:logicalId", + "data": "VideoInputBucket940F4F43", "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", + "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:8:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -168,30 +122,16 @@ "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", "internal/main/run_main_module.js:17:47" ] - }, + } + ], + "/development-Storage/AudioExtractedBucket/Resource": [ { - "type": "aws:cdk:asset", - "data": { - "path": "asset.9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c.zip", - "id": "9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c", - "packaging": "file", - "sourceHash": "9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c", - "s3BucketParameter": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3Bucket0C7B666B", - "s3KeyParameter": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB", - "artifactHashParameter": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cArtifactHashA7AAFCE1" - }, + "type": "aws:cdk:logicalId", + "data": "AudioExtractedBucketE38BCDCF", "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", + "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:12:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -199,30 +139,16 @@ "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", "internal/main/run_main_module.js:17:47" ] - }, + } + ], + "/development-Storage/VideoTranscriptionsBucket/Resource": [ { - "type": "aws:cdk:asset", - "data": { - "path": "asset.a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3.zip", - "id": "a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3", - "packaging": "file", - "sourceHash": "a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3", - "s3BucketParameter": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3BucketAD7A2B93", - "s3KeyParameter": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B", - "artifactHashParameter": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3ArtifactHashF630AF8E" - }, + "type": "aws:cdk:logicalId", + "data": "VideoTranscriptionsBucket52F9EC40", "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", + "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:16:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -232,14 +158,14 @@ ] } ], - "/development-EncodeService/VideoInputBucket/Resource": [ + "/development-Storage/VideoEncodedBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "VideoInputBucket940F4F43", + "data": "VideoEncodedBucket1B0DA95A", "trace": [ - "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:521:26)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:20:28)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", + "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:20:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -249,16 +175,19 @@ ] } ], - "/development-EncodeService/VideoInputBucket/Notifications/Resource": [ + "/development-Storage/CDKMetadata/Default": [ { "type": "aws:cdk:logicalId", - "data": "VideoInputBucketNotifications76FF7081", + "data": "CDKMetadata", "trace": [ - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:86:29)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:56:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", + "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", + "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", + "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", + "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -268,17 +197,19 @@ ] } ], - "/development-EncodeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B": [ + "/development-Storage/CDKMetadata/Condition": [ { "type": "aws:cdk:logicalId", - "data": "VideoInputBucketAllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B86D7DD34", + "data": "CDKMetadataAvailable", "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:45:36)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:56:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", + "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", + "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", + "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", + "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -287,15 +218,31 @@ "internal/main/run_main_module.js:17:47" ] } - ], - "/development-EncodeService/FFMPEGformLayer/Resource": [ + ] + }, + "displayName": "development-Storage" + }, + "development-EncodeService": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "development-EncodeService.template.json", + "validateOnSynth": false + }, + "metadata": { + "/development-EncodeService/CDKMetadata/Default": [ { "type": "aws:cdk:logicalId", - "data": "FFMPEGformLayer787129EE", + "data": "CDKMetadata", "trace": [ - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:64:26)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:29:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", + "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", + "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", + "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", + "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -305,21 +252,19 @@ ] } ], - "/development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket": [ + "/development-EncodeService/CDKMetadata/Condition": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", + "data": "CDKMetadataAvailable", "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:29:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", + "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", + "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", + "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", + "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", + "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -328,22 +273,41 @@ "internal/main/run_main_module.js:17:47" ] } - ], - "/development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey": [ + ] + }, + "displayName": "development-EncodeService" + }, + "development-TranscribeService": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "development-TranscribeService.template.json", + "validateOnSynth": false + }, + "metadata": { + "/development-TranscribeService": [ { - "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", + "type": "aws:cdk:asset", + "data": { + "path": "asset.c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c.zip", + "id": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", + "packaging": "file", + "sourceHash": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", + "s3BucketParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", + "s3KeyParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", + "artifactHashParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E" + }, "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", + "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", + "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:29:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -351,23 +315,30 @@ "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", "internal/main/run_main_module.js:17:47" ] - } - ], - "/development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash": [ + }, { - "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E", + "type": "aws:cdk:asset", + "data": { + "path": "asset.e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14.zip", + "id": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", + "packaging": "file", + "sourceHash": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", + "s3BucketParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE", + "s3KeyParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49", + "artifactHashParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513" + }, "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", + "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", + "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:29:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", + "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -377,22 +348,16 @@ ] } ], - "/development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/S3Bucket": [ + "/development-TranscribeService/VideoInputBucket/Notifications/Resource": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3Bucket6469C901", + "data": "VideoInputBucketNotifications76FF7081", "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:95:29)", + "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", + "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -402,22 +367,17 @@ ] } ], - "/development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/S3VersionKey": [ + "/development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A", + "data": "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A0588AE5F", "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", + "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", + "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:47:36)", + "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -427,22 +387,14 @@ ] } ], - "/development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/ArtifactHash": [ + "/development-TranscribeService/ffmpeg-layer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aArtifactHashE258F64E", + "data": "ffmpeglayer406486B5", "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:64:26)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -452,22 +404,21 @@ ] } ], - "/development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/S3Bucket": [ + "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3Bucket0C7B666B", + "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -477,22 +428,21 @@ ] } ], - "/development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/S3VersionKey": [ + "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB", + "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -502,22 +452,21 @@ ] } ], - "/development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/ArtifactHash": [ + "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cArtifactHashA7AAFCE1", + "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -527,22 +476,22 @@ ] } ], - "/development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/S3Bucket": [ + "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3BucketAD7A2B93", + "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -552,22 +501,22 @@ ] } ], - "/development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/S3VersionKey": [ + "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B", + "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -577,22 +526,22 @@ ] } ], - "/development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/ArtifactHash": [ + "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3ArtifactHashF630AF8E", + "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "EncodeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", + "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -602,7 +551,7 @@ ] } ], - "/development-EncodeService/ExtractAudioLambda/ServiceRole/Resource": [ + "/development-TranscribeService/ExtractAudioLambda/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", "data": "ExtractAudioLambdaServiceRole0AE87B8E", @@ -610,8 +559,8 @@ "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -621,19 +570,19 @@ ] } ], - "/development-EncodeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource": [ + "/development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", "data": "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", "trace": [ "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Function.addToPrincipal (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:90:65)", - "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", - "Bucket.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:380:31)", - "Bucket.grantReadWrite (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:320:21)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:57:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "Function.addToPrincipal (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/grant.js:90:65)", + "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", + "Import.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:442:31)", + "Import.grantReadWrite (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:335:21)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:52:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -643,32 +592,15 @@ ] } ], - "/development-EncodeService/ExtractAudioLambda/Resource": [ + "/development-TranscribeService/ExtractAudioLambda/Resource": [ { "type": "aws:cdk:logicalId", "data": "ExtractAudioLambda12696EC4", "trace": [ "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:44:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ExtractAudioBucket/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ExtractAudioBucket197901EB", - "trace": [ - "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:521:26)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:54:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -678,16 +610,19 @@ ] } ], - "/development-EncodeService/ExtractAudioBucket/Notifications/Resource": [ + "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ExtractAudioBucketNotificationsF31E573B", + "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", "trace": [ - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:86:29)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:69:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", + "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", + "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:31:21)", + "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", + "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", + "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", + "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -697,812 +632,21 @@ ] } ], - "/development-EncodeService/ExtractAudioBucket/AllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA7": [ + "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "ExtractAudioBucketAllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA78FA674F1", + "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:45:36)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:69:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:29:22)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:56:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Role.addToPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:217:21)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:36:14)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:56:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "trace": [ - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:52:26)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:56:20)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/sendTranscriptionLambda/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "sendTranscriptionLambdaServiceRole094A4526", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/sendTranscriptionLambda/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "sendTranscriptionLambda653766BA", - "trace": [ - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:60:35)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceF97F9386", - "trace": [ - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:401:26)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/CloudWatchRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceCloudWatchRole21D61FAC", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "RestApi._configureCloudWatchRole (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:250:22)", - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:417:18)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Account": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceAccount12973782", - "trace": [ - "RestApi._configureCloudWatchRole (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:254:26)", - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:417:18)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Deployment/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceDeploymentB7C1F9F3b6edd3162f55477a4db20b005d94fb8d", - "trace": [ - "new Deployment (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/deployment.js:48:25)", - "RestApi._configureDeployment (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:278:38)", - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:419:14)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/DeploymentStage.development/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A", - "trace": [ - "new Stage (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/stage.js:61:26)", - "RestApi._configureDeployment (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:286:36)", - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:419:14)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Endpoint": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServiceEndpointE631541E", - "trace": [ - "RestApi._configureDeployment (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:290:13)", - "new RestApi (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/restapi.js:419:14)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:76:15)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookE33C8AAD", - "trace": [ - "new Resource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:231:26)", - "RootResource.addResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:28:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:83:39)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookGETApiPermissiondevelopmentEncodeServiceApiGatewayForApiService7F461E87GETwebhookA35D73C7", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaIntegration.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/integrations/lambda.js:44:22)", - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:41:40)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:98:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookGETApiPermissionTestdevelopmentEncodeServiceApiGatewayForApiService7F461E87GETwebhook3F21A025", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaIntegration.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/integrations/lambda.js:51:26)", - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:41:40)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:98:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookGET094EEC39", - "trace": [ - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:57:26)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:98:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookPOSTApiPermissiondevelopmentEncodeServiceApiGatewayForApiService7F461E87POSTwebhookFC378AD1", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaIntegration.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/integrations/lambda.js:44:22)", - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:41:40)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:99:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookPOSTApiPermissionTestdevelopmentEncodeServiceApiGatewayForApiService7F461E87POSTwebhookBCE7B76D", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaIntegration.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/integrations/lambda.js:51:26)", - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:41:40)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:99:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ApiGatewayForApiServicewebhookPOSTA353740B", - "trace": [ - "new Method (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/method.js:57:26)", - "Resource.addMethod (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-apigateway/lib/resource.js:36:16)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:99:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/assemblyWebhookLambda/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "assemblyWebhookLambdaServiceRoleA8F8BA14", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/assemblyWebhookLambda/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "assemblyWebhookLambdaServiceRoleDefaultPolicyA3CB1869", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Function.addToPrincipal (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:90:65)", - "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", - "Bucket.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:380:31)", - "Bucket.grantReadWrite (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:320:21)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:103:28)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/assemblyWebhookLambda/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "assemblyWebhookLambda2AE37EC2", - "trace": [ - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:86:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/VideoTranscriptionBucket/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoTranscriptionBucket53EBD46C", - "trace": [ - "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:521:26)", - "new EncodeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/encode/index.js:102:36)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:36:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ] - }, - "displayName": "development-EncodeService" - }, - "development-TranscribeService": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "development-TranscribeService.template.json", - "validateOnSynth": false - }, - "metadata": { - "/development-TranscribeService": [ - { - "type": "aws:cdk:asset", - "data": { - "path": "asset.d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb.zip", - "id": "d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb", - "packaging": "file", - "sourceHash": "d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb", - "s3BucketParameter": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3Bucket9E8432EF", - "s3KeyParameter": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28", - "artifactHashParameter": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbArtifactHashEF6BA326" - }, - "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/encodeCaptionsQueue/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "encodeCaptionsQueueEFD23B45", - "trace": [ - "new Queue (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-sqs/lib/queue.js:54:23)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:18:33)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/encodeCaptionsLambda/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "encodeCaptionsLambdaServiceRoleCE3B5A0B", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/encodeCaptionsLambda/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "encodeCaptionsLambdaServiceRoleDefaultPolicy3055993F", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Function.addToPrincipal (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:90:65)", - "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", - "Queue.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-sqs/lib/queue-base.js:112:26)", - "Queue.grantConsumeMessages (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-sqs/lib/queue-base.js:63:26)", - "SqsEventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/sqs.js:50:20)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:35:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/encodeCaptionsLambda/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "encodeCaptionsLambdaE696604A", - "trace": [ - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/encodeCaptionsLambda/SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "encodeCaptionsLambdaSqsEventSourcedevelopmentTranscribeServiceencodeCaptionsQueue48B8AA4B4A0DBF97", - "trace": [ - "new EventSourceMapping (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/event-source-mapping.js:121:39)", - "Function.addEventSourceMapping (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:110:16)", - "SqsEventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/sqs.js:43:43)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:35:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/S3Bucket": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3Bucket9E8432EF", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/S3VersionKey": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/ArtifactHash": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbArtifactHashEF6BA326", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:23:34)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/VideoInputBucket/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoInputBucket940F4F43", - "trace": [ - "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:521:26)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:33:30)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/VideoInputBucket/Notifications/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoInputBucketNotifications76FF7081", - "trace": [ - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:86:29)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "S3EventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/s3.js:28:25)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:36:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF17": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF1776EBDDA8", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:45:36)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "S3EventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/s3.js:28:25)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:36:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:29:22)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "S3EventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/s3.js:28:25)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:36:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Role.addToPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:217:21)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:36:14)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "S3EventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/s3.js:28:25)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:36:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", + "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", + "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:209:34)", + "Role.addToPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:221:21)", + "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:37:19)", + "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", + "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", + "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", + "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -1517,15 +661,13 @@ "type": "aws:cdk:logicalId", "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", "trace": [ - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:52:26)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:78:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:85:94)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:42:31)", - "Bucket.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:691:28)", - "S3EventSource.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda-event-sources/lib/s3.js:28:25)", - "Function.addEventSource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:168:16)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:36:26)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:43:1)", + "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:53:26)", + "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", + "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", + "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", + "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -1547,7 +689,7 @@ "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -1569,7 +711,7 @@ "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:50:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", diff --git a/cdk.out/tree.json b/cdk.out/tree.json index bdd5487..bbb49b7 100644 --- a/cdk.out/tree.json +++ b/cdk.out/tree.json @@ -101,47 +101,227 @@ "version": "1.107.0" } }, - "development-EncodeService": { - "id": "development-EncodeService", - "path": "development-EncodeService", + "development-Storage": { + "id": "development-Storage", + "path": "development-Storage", "children": { "VideoInputBucket": { "id": "VideoInputBucket", - "path": "development-EncodeService/VideoInputBucket", + "path": "development-Storage/VideoInputBucket", + "children": { + "Notifications": { + "id": "Notifications", + "path": "development-Storage/VideoInputBucket/Notifications", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.130.0" + } + }, + "Resource": { + "id": "Resource", + "path": "development-Storage/VideoInputBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "1.130.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "1.130.0" + } + }, + "AudioExtractedBucket": { + "id": "AudioExtractedBucket", + "path": "development-Storage/AudioExtractedBucket", + "children": { + "Notifications": { + "id": "Notifications", + "path": "development-Storage/AudioExtractedBucket/Notifications", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.130.0" + } + }, + "Resource": { + "id": "Resource", + "path": "development-Storage/AudioExtractedBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "1.130.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "1.130.0" + } + }, + "VideoTranscriptionsBucket": { + "id": "VideoTranscriptionsBucket", + "path": "development-Storage/VideoTranscriptionsBucket", + "children": { + "Notifications": { + "id": "Notifications", + "path": "development-Storage/VideoTranscriptionsBucket/Notifications", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.130.0" + } + }, + "Resource": { + "id": "Resource", + "path": "development-Storage/VideoTranscriptionsBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "1.130.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "1.130.0" + } + }, + "VideoEncodedBucket": { + "id": "VideoEncodedBucket", + "path": "development-Storage/VideoEncodedBucket", "children": { + "Notifications": { + "id": "Notifications", + "path": "development-Storage/VideoEncodedBucket/Notifications", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.130.0" + } + }, "Resource": { "id": "Resource", - "path": "development-EncodeService/VideoInputBucket/Resource", + "path": "development-Storage/VideoEncodedBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": {} }, "constructInfo": { "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "1.130.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "1.130.0" + } + }, + "CDKMetadata": { + "id": "CDKMetadata", + "path": "development-Storage/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "development-Storage/CDKMetadata/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "1.107.0" + } + }, + "Condition": { + "id": "Condition", + "path": "development-Storage/CDKMetadata/Condition", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnCondition", + "version": "1.107.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.107.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "1.107.0" + } + }, + "development-EncodeService": { + "id": "development-EncodeService", + "path": "development-EncodeService", + "children": { + "CDKMetadata": { + "id": "CDKMetadata", + "path": "development-EncodeService/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "development-EncodeService/CDKMetadata/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", "version": "1.107.0" } }, + "Condition": { + "id": "Condition", + "path": "development-EncodeService/CDKMetadata/Condition", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnCondition", + "version": "1.107.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.107.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "1.107.0" + } + }, + "development-TranscribeService": { + "id": "development-TranscribeService", + "path": "development-TranscribeService", + "children": { + "VideoInputBucket": { + "id": "VideoInputBucket", + "path": "development-TranscribeService/VideoInputBucket", + "children": { "Notifications": { "id": "Notifications", - "path": "development-EncodeService/VideoInputBucket/Notifications", + "path": "development-TranscribeService/VideoInputBucket/Notifications", "children": { "Resource": { "id": "Resource", - "path": "development-EncodeService/VideoInputBucket/Notifications/Resource", + "path": "development-TranscribeService/VideoInputBucket/Notifications/Resource", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" + "version": "1.130.0" } } }, "constructInfo": { "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" + "version": "1.130.0" } }, - "AllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B": { - "id": "AllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B", - "path": "development-EncodeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentEncodeServiceExtractAudioLambdaA619F51B", + "AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A": { + "id": "AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A", + "path": "development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", "aws:cdk:cloudformation:props": { @@ -157,9 +337,15 @@ "Ref": "AWS::AccountId" }, "sourceArn": { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] ] } } @@ -171,21 +357,39 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "1.107.0" + "fqn": "@aws-cdk/aws-s3.BucketBase", + "version": "1.130.0" + } + }, + "AudioExtractedBucket": { + "id": "AudioExtractedBucket", + "path": "development-TranscribeService/AudioExtractedBucket", + "children": { + "Notifications": { + "id": "Notifications", + "path": "development-TranscribeService/AudioExtractedBucket/Notifications", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "1.130.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketBase", + "version": "1.130.0" } }, - "FFMPEGformLayer": { - "id": "FFMPEGformLayer", - "path": "development-EncodeService/FFMPEGformLayer", + "ffmpeg-layer": { + "id": "ffmpeg-layer", + "path": "development-TranscribeService/ffmpeg-layer", "children": { "Code": { "id": "Code", - "path": "development-EncodeService/FFMPEGformLayer/Code", + "path": "development-TranscribeService/ffmpeg-layer/Code", "children": { "Stage": { "id": "Stage", - "path": "development-EncodeService/FFMPEGformLayer/Code/Stage", + "path": "development-TranscribeService/ffmpeg-layer/Code/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "1.107.0" @@ -193,7 +397,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "development-EncodeService/FFMPEGformLayer/Code/AssetBucket", + "path": "development-TranscribeService/ffmpeg-layer/Code/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "1.107.0" @@ -207,7 +411,7 @@ }, "Resource": { "id": "Resource", - "path": "development-EncodeService/FFMPEGformLayer/Resource", + "path": "development-TranscribeService/ffmpeg-layer/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::LayerVersion", "aws:cdk:cloudformation:props": { @@ -250,9 +454,11 @@ } }, "compatibleRuntimes": [ - "nodejs12.x" + "nodejs10.x", + "nodejs12.x", + "nodejs14.x" ], - "description": "Binary file of ffmpeg" + "description": "ffmpeg use for lambda" } }, "constructInfo": { @@ -268,83 +474,15 @@ }, "AssetParameters": { "id": "AssetParameters", - "path": "development-EncodeService/AssetParameters", + "path": "development-TranscribeService/AssetParameters", "children": { "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c": { "id": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "path": "development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "development-EncodeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a": { - "id": "02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a", - "path": "development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a", - "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/S3Bucket", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/S3VersionKey", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "development-EncodeService/AssetParameters/02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37a/ArtifactHash", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c": { - "id": "9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c", - "path": "development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c", + "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/S3Bucket", + "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -352,7 +490,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/S3VersionKey", + "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -360,7 +498,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "development-EncodeService/AssetParameters/9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3c/ArtifactHash", + "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -372,13 +510,13 @@ "version": "1.107.0" } }, - "a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3": { - "id": "a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3", - "path": "development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3", + "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14": { + "id": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", + "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/S3Bucket", + "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -386,7 +524,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/S3VersionKey", + "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -394,7 +532,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "development-EncodeService/AssetParameters/a6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3/ArtifactHash", + "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -414,15 +552,15 @@ }, "ExtractAudioLambda": { "id": "ExtractAudioLambda", - "path": "development-EncodeService/ExtractAudioLambda", + "path": "development-TranscribeService/ExtractAudioLambda", "children": { "ServiceRole": { "id": "ServiceRole", - "path": "development-EncodeService/ExtractAudioLambda/ServiceRole", + "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole", "children": { "Resource": { "id": "Resource", - "path": "development-EncodeService/ExtractAudioLambda/ServiceRole/Resource", + "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -461,11 +599,11 @@ }, "DefaultPolicy": { "id": "DefaultPolicy", - "path": "development-EncodeService/ExtractAudioLambda/ServiceRole/DefaultPolicy", + "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy", "children": { "Resource": { "id": "Resource", - "path": "development-EncodeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource", + "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Policy", "aws:cdk:cloudformation:props": { @@ -483,22 +621,26 @@ "Effect": "Allow", "Resource": [ { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] ] }, { "Fn::Join": [ "", [ + "arn:", { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] + "Ref": "AWS::Partition" }, - "/*" + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u/*" ] ] } @@ -516,22 +658,26 @@ "Effect": "Allow", "Resource": [ { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" + ] ] }, { "Fn::Join": [ "", [ + "arn:", { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" - ] + "Ref": "AWS::Partition" }, - "/*" + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz/*" ] ] } @@ -567,11 +713,11 @@ }, "Code": { "id": "Code", - "path": "development-EncodeService/ExtractAudioLambda/Code", + "path": "development-TranscribeService/ExtractAudioLambda/Code", "children": { "Stage": { "id": "Stage", - "path": "development-EncodeService/ExtractAudioLambda/Code/Stage", + "path": "development-TranscribeService/ExtractAudioLambda/Code/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "1.107.0" @@ -579,7 +725,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "development-EncodeService/ExtractAudioLambda/Code/AssetBucket", + "path": "development-TranscribeService/ExtractAudioLambda/Code/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "1.107.0" @@ -593,13 +739,13 @@ }, "Resource": { "id": "Resource", - "path": "development-EncodeService/ExtractAudioLambda/Resource", + "path": "development-TranscribeService/ExtractAudioLambda/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3Bucket6469C901" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE" }, "s3Key": { "Fn::Join": [ @@ -612,7 +758,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" } ] } @@ -625,7 +771,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters02492197f4060c2111fc2d2b3a6fe383f596b57db0470997547636a9f781a37aS3VersionKey1DC1FF1A" + "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" } ] } @@ -643,13 +789,45 @@ }, "environment": { "variables": { - "STAGE": "development" + "STAGE": "development", + "NODE_ENV": "development", + "SUPABASE_API_URL": "https://jtlvnnrxubgfwmzltxon.supabase.co", + "SUPABASE_API_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzNDQwOTk2NSwiZXhwIjoxOTQ5OTg1OTY1fQ.-i-Jl1gw1MM2KAz7NZwLrADMpqtBmY38t4_oHR6KGeM", + "VIDEO_INPUT_BUCKET": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" + ] + ] + }, + "EXTRACTED_VIDEO_AUDIO_BUCKET": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" + ] + ] + } } }, - "functionName": "extraAudioLambda", + "functionName": "extractAudioLambda", "handler": "extract-audio.handler", + "layers": [ + { + "Ref": "ffmpeglayer406486B5" + } + ], "memorySize": 521, - "runtime": "nodejs10.x", + "runtime": "nodejs12.x", "timeout": 60 } }, @@ -664,1496 +842,6 @@ "version": "1.107.0" } }, - "ExtractAudioBucket": { - "id": "ExtractAudioBucket", - "path": "development-EncodeService/ExtractAudioBucket", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ExtractAudioBucket/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::S3::Bucket", - "aws:cdk:cloudformation:props": {} - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "1.107.0" - } - }, - "Notifications": { - "id": "Notifications", - "path": "development-EncodeService/ExtractAudioBucket/Notifications", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ExtractAudioBucket/Notifications/Resource", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "AllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA7": { - "id": "AllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA7", - "path": "development-EncodeService/ExtractAudioBucket/AllowBucketNotificationsTodevelopmentEncodeServicesendTranscriptionLambda53BB1DA7", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "sendTranscriptionLambda653766BA", - "Arn" - ] - }, - "principal": "s3.amazonaws.com", - "sourceAccount": { - "Ref": "AWS::AccountId" - }, - "sourceArn": { - "Fn::GetAtt": [ - "ExtractAudioBucket197901EB", - "Arn" - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "1.107.0" - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { - "id": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834", - "children": { - "Role": { - "id": "Role", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-EncodeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "sendTranscriptionLambda": { - "id": "sendTranscriptionLambda", - "path": "development-EncodeService/sendTranscriptionLambda", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "development-EncodeService/sendTranscriptionLambda/ServiceRole", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/sendTranscriptionLambda/ServiceRole/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Code": { - "id": "Code", - "path": "development-EncodeService/sendTranscriptionLambda/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "development-EncodeService/sendTranscriptionLambda/Code/Stage", - "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "1.107.0" - } - }, - "AssetBucket": { - "id": "AssetBucket", - "path": "development-EncodeService/sendTranscriptionLambda/Code/AssetBucket", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-EncodeService/sendTranscriptionLambda/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Function", - "aws:cdk:cloudformation:props": { - "code": { - "s3Bucket": { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3Bucket0C7B666B" - }, - "s3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters9c759408e1bbd07cadfb486665e0d587d5c04c7d7c58977871f1dcf5ceb54c3cS3VersionKey3F21A3EB" - } - ] - } - ] - } - ] - ] - } - }, - "role": { - "Fn::GetAtt": [ - "sendTranscriptionLambdaServiceRole094A4526", - "Arn" - ] - }, - "environment": { - "variables": { - "STAGE": "development" - } - }, - "functionName": "sendTranscriptionLambda", - "handler": "send-transcribe-job.handler", - "memorySize": 521, - "runtime": "nodejs10.x", - "timeout": 60 - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnFunction", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.Function", - "version": "1.107.0" - } - }, - "ApiGatewayForApiService": { - "id": "ApiGatewayForApiService", - "path": "development-EncodeService/ApiGatewayForApiService", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::RestApi", - "aws:cdk:cloudformation:props": { - "failOnWarnings": true, - "name": "assembly-development-webhook" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnRestApi", - "version": "1.107.0" - } - }, - "CloudWatchRole": { - "id": "CloudWatchRole", - "path": "development-EncodeService/ApiGatewayForApiService/CloudWatchRole", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/CloudWatchRole/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "apigateway.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Account": { - "id": "Account", - "path": "development-EncodeService/ApiGatewayForApiService/Account", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Account", - "aws:cdk:cloudformation:props": { - "cloudWatchRoleArn": { - "Fn::GetAtt": [ - "ApiGatewayForApiServiceCloudWatchRole21D61FAC", - "Arn" - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnAccount", - "version": "1.107.0" - } - }, - "Deployment": { - "id": "Deployment", - "path": "development-EncodeService/ApiGatewayForApiService/Deployment", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/Deployment/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Deployment", - "aws:cdk:cloudformation:props": { - "restApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "description": "Automatically created by the RestApi construct" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnDeployment", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.Deployment", - "version": "1.107.0" - } - }, - "DeploymentStage.development": { - "id": "DeploymentStage.development", - "path": "development-EncodeService/ApiGatewayForApiService/DeploymentStage.development", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/DeploymentStage.development/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Stage", - "aws:cdk:cloudformation:props": { - "restApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "deploymentId": { - "Ref": "ApiGatewayForApiServiceDeploymentB7C1F9F3b6edd3162f55477a4db20b005d94fb8d" - }, - "stageName": "development" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnStage", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.Stage", - "version": "1.107.0" - } - }, - "Endpoint": { - "id": "Endpoint", - "path": "development-EncodeService/ApiGatewayForApiService/Endpoint", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "1.107.0" - } - }, - "Default": { - "id": "Default", - "path": "development-EncodeService/ApiGatewayForApiService/Default", - "children": { - "webhook": { - "id": "webhook", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Resource", - "aws:cdk:cloudformation:props": { - "parentId": { - "Fn::GetAtt": [ - "ApiGatewayForApiServiceF97F9386", - "RootResourceId" - ] - }, - "pathPart": "webhook", - "restApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnResource", - "version": "1.107.0" - } - }, - "GET": { - "id": "GET", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET", - "children": { - "ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook": { - "id": "ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "principal": "apigateway.amazonaws.com", - "sourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/", - { - "Ref": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A" - }, - "/GET/webhook" - ] - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - }, - "ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook": { - "id": "ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.GET..webhook", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "principal": "apigateway.amazonaws.com", - "sourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/test-invoke-stage/GET/webhook" - ] - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/GET/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", - "aws:cdk:cloudformation:props": { - "httpMethod": "GET", - "resourceId": { - "Ref": "ApiGatewayForApiServicewebhookE33C8AAD" - }, - "restApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "authorizationType": "NONE", - "integration": { - "type": "AWS_PROXY", - "uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "integrationHttpMethod": "POST" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnMethod", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.Method", - "version": "1.107.0" - } - }, - "POST": { - "id": "POST", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST", - "children": { - "ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook": { - "id": "ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "principal": "apigateway.amazonaws.com", - "sourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/", - { - "Ref": "ApiGatewayForApiServiceDeploymentStagedevelopmentC066677A" - }, - "/POST/webhook" - ] - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - }, - "ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook": { - "id": "ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/ApiPermission.Test.developmentEncodeServiceApiGatewayForApiService7F461E87.POST..webhook", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "principal": "apigateway.amazonaws.com", - "sourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":execute-api:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":", - { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "/test-invoke-stage/POST/webhook" - ] - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-EncodeService/ApiGatewayForApiService/Default/webhook/POST/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", - "aws:cdk:cloudformation:props": { - "httpMethod": "POST", - "resourceId": { - "Ref": "ApiGatewayForApiServicewebhookE33C8AAD" - }, - "restApiId": { - "Ref": "ApiGatewayForApiServiceF97F9386" - }, - "authorizationType": "NONE", - "integration": { - "type": "AWS_PROXY", - "uri": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":apigateway:", - { - "Ref": "AWS::Region" - }, - ":lambda:path/2015-03-31/functions/", - { - "Fn::GetAtt": [ - "assemblyWebhookLambda2AE37EC2", - "Arn" - ] - }, - "/invocations" - ] - ] - }, - "integrationHttpMethod": "POST" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.CfnMethod", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.Method", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.ResourceBase", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-apigateway.RestApi", - "version": "1.107.0" - } - }, - "assemblyWebhookLambda": { - "id": "assemblyWebhookLambda", - "path": "development-EncodeService/assemblyWebhookLambda", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "development-EncodeService/assemblyWebhookLambda/ServiceRole", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/assemblyWebhookLambda/ServiceRole/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "development-EncodeService/assemblyWebhookLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/assemblyWebhookLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "VideoTranscriptionBucket53EBD46C", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "VideoTranscriptionBucket53EBD46C", - "Arn" - ] - }, - "/*" - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "assemblyWebhookLambdaServiceRoleDefaultPolicyA3CB1869", - "roles": [ - { - "Ref": "assemblyWebhookLambdaServiceRoleA8F8BA14" - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Code": { - "id": "Code", - "path": "development-EncodeService/assemblyWebhookLambda/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "development-EncodeService/assemblyWebhookLambda/Code/Stage", - "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "1.107.0" - } - }, - "AssetBucket": { - "id": "AssetBucket", - "path": "development-EncodeService/assemblyWebhookLambda/Code/AssetBucket", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-EncodeService/assemblyWebhookLambda/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Function", - "aws:cdk:cloudformation:props": { - "code": { - "s3Bucket": { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3BucketAD7A2B93" - }, - "s3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersa6189e71e6c18ecc6e19f6b950142cdd2e056cf5c9355c42393adb5be4db9da3S3VersionKey0279340B" - } - ] - } - ] - } - ] - ] - } - }, - "role": { - "Fn::GetAtt": [ - "assemblyWebhookLambdaServiceRoleA8F8BA14", - "Arn" - ] - }, - "environment": { - "variables": { - "STAGE": "development" - } - }, - "functionName": "assemblyWebhookLambda", - "handler": "assembly-webhook.handler", - "memorySize": 521, - "runtime": "nodejs10.x", - "timeout": 60 - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnFunction", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.Function", - "version": "1.107.0" - } - }, - "VideoTranscriptionBucket": { - "id": "VideoTranscriptionBucket", - "path": "development-EncodeService/VideoTranscriptionBucket", - "children": { - "Resource": { - "id": "Resource", - "path": "development-EncodeService/VideoTranscriptionBucket/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::S3::Bucket", - "aws:cdk:cloudformation:props": {} - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "1.107.0" - } - }, - "Notifications": { - "id": "Notifications", - "path": "development-EncodeService/VideoTranscriptionBucket/Notifications", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "1.107.0" - } - }, - "CDKMetadata": { - "id": "CDKMetadata", - "path": "development-EncodeService/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "development-EncodeService/CDKMetadata/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - }, - "Condition": { - "id": "Condition", - "path": "development-EncodeService/CDKMetadata/Condition", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnCondition", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "1.107.0" - } - }, - "development-TranscribeService": { - "id": "development-TranscribeService", - "path": "development-TranscribeService", - "children": { - "encodeCaptionsQueue": { - "id": "encodeCaptionsQueue", - "path": "development-TranscribeService/encodeCaptionsQueue", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/encodeCaptionsQueue/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::SQS::Queue", - "aws:cdk:cloudformation:props": { - "visibilityTimeout": 180 - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-sqs.CfnQueue", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-sqs.Queue", - "version": "1.107.0" - } - }, - "encodeCaptionsLambda": { - "id": "encodeCaptionsLambda", - "path": "development-TranscribeService/encodeCaptionsLambda", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/encodeCaptionsLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "sqs:ReceiveMessage", - "sqs:ChangeMessageVisibility", - "sqs:GetQueueUrl", - "sqs:DeleteMessage", - "sqs:GetQueueAttributes" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "encodeCaptionsQueueEFD23B45", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "encodeCaptionsLambdaServiceRoleDefaultPolicy3055993F", - "roles": [ - { - "Ref": "encodeCaptionsLambdaServiceRoleCE3B5A0B" - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Code": { - "id": "Code", - "path": "development-TranscribeService/encodeCaptionsLambda/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "development-TranscribeService/encodeCaptionsLambda/Code/Stage", - "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "1.107.0" - } - }, - "AssetBucket": { - "id": "AssetBucket", - "path": "development-TranscribeService/encodeCaptionsLambda/Code/AssetBucket", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/encodeCaptionsLambda/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Function", - "aws:cdk:cloudformation:props": { - "code": { - "s3Bucket": { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3Bucket9E8432EF" - }, - "s3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersd9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcbS3VersionKeyBA826A28" - } - ] - } - ] - } - ] - ] - } - }, - "role": { - "Fn::GetAtt": [ - "encodeCaptionsLambdaServiceRoleCE3B5A0B", - "Arn" - ] - }, - "environment": { - "variables": { - "STAGE": "development" - } - }, - "functionName": "encodeCaptionsLambda", - "handler": "encode-captions-for-export.handler", - "memorySize": 521, - "runtime": "nodejs10.x", - "timeout": 60 - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnFunction", - "version": "1.107.0" - } - }, - "SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B": { - "id": "SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B", - "path": "development-TranscribeService/encodeCaptionsLambda/SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/encodeCaptionsLambda/SqsEventSource:developmentTranscribeServiceencodeCaptionsQueue48B8AA4B/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::EventSourceMapping", - "aws:cdk:cloudformation:props": { - "functionName": { - "Ref": "encodeCaptionsLambdaE696604A" - }, - "eventSourceArn": { - "Fn::GetAtt": [ - "encodeCaptionsQueueEFD23B45", - "Arn" - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnEventSourceMapping", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.EventSourceMapping", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.Function", - "version": "1.107.0" - } - }, - "AssetParameters": { - "id": "AssetParameters", - "path": "development-TranscribeService/AssetParameters", - "children": { - "d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb": { - "id": "d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb", - "path": "development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb", - "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/S3Bucket", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/S3VersionKey", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/d9d4aa8321272ad8816348fdb2bcef39583072ee2cf3c2bec6c8f98b558d3fcb/ArtifactHash", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "VideoInputBucket": { - "id": "VideoInputBucket", - "path": "development-TranscribeService/VideoInputBucket", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/VideoInputBucket/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::S3::Bucket", - "aws:cdk:cloudformation:props": {} - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "1.107.0" - } - }, - "Notifications": { - "id": "Notifications", - "path": "development-TranscribeService/VideoInputBucket/Notifications", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/VideoInputBucket/Notifications/Resource", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "AllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF17": { - "id": "AllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF17", - "path": "development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceencodeCaptionsLambdaF225AF17", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "encodeCaptionsLambdaE696604A", - "Arn" - ] - }, - "principal": "s3.amazonaws.com", - "sourceAccount": { - "Ref": "AWS::AccountId" - }, - "sourceArn": { - "Fn::GetAtt": [ - "VideoInputBucket940F4F43", - "Arn" - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "1.107.0" - } - }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { "id": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834", "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834", @@ -2198,7 +886,7 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" + "version": "1.130.0" } }, "DefaultPolicy": { @@ -2217,6 +905,11 @@ "Action": "s3:PutBucketNotification", "Effect": "Allow", "Resource": "*" + }, + { + "Action": "s3:GetBucketNotification", + "Effect": "Allow", + "Resource": "*" } ], "Version": "2012-10-17" @@ -2231,19 +924,19 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.107.0" + "version": "1.130.0" } } }, "constructInfo": { "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.107.0" + "version": "1.130.0" } } }, "constructInfo": { "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" + "version": "1.130.0" } }, "Resource": { @@ -2251,13 +944,13 @@ "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" + "version": "1.130.0" } } }, "constructInfo": { "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" + "version": "1.130.0" } }, "CDKMetadata": { diff --git a/infrastructure/config.json b/infrastructure/config.json index 259a5c0..fb9eddf 100644 --- a/infrastructure/config.json +++ b/infrastructure/config.json @@ -3,6 +3,10 @@ "dynamo": { "stack": "Dynamo", "entry": "./src/core/dynamo" + }, + "storage": { + "stack": "Storage", + "entry": "./src/core/storage" } }, "services": [ diff --git a/infrastructure/infrastructure.js b/infrastructure/infrastructure.js index 62dec20..b81a249 100644 --- a/infrastructure/infrastructure.js +++ b/infrastructure/infrastructure.js @@ -10,6 +10,7 @@ const { Dynamo } = require("./central/dynamodb"); const { EncodeService } = require("./services/encode"); const { TranscribeService } = require("./services/transcribe"); +const { Storage } = require('./central/storage'); console.log(process.env.AWS_ACCESS_KEY_ID) @@ -31,6 +32,11 @@ new Dynamo(app, `${stage}-Dynamo`, { env, stage, }); +new Storage(app, `${stage}-Storage`, { + serviceName: "storage", + env, + stage +}); // Services new EncodeService(app, `${stage}-EncodeService`, { @@ -47,4 +53,5 @@ new TranscribeService(app, `${stage}-TranscribeService`, { dependencies: {}, }); + app.synth(); diff --git a/infrastructure/services/encode/index.js b/infrastructure/services/encode/index.js index 2672ea9..4477d9d 100644 --- a/infrastructure/services/encode/index.js +++ b/infrastructure/services/encode/index.js @@ -8,7 +8,6 @@ const s3n = require('@aws-cdk/aws-s3-notifications'); const { Duration }= require('@aws-cdk/core'); const sqs = require('@aws-cdk/aws-sqs'); const { SqsEventSource, S3EventSource } = require('@aws-cdk/aws-lambda-event-sources'); -const s3 = require('@aws-cdk/aws-s3'); const createLambdaFunction = require('../../utils/create-lambda-function'); class EncodeService extends cdk.Stack { diff --git a/infrastructure/services/transcribe/index.js b/infrastructure/services/transcribe/index.js index 893b11d..1f0a60a 100644 --- a/infrastructure/services/transcribe/index.js +++ b/infrastructure/services/transcribe/index.js @@ -16,10 +16,8 @@ class TranscribeService extends cdk.Stack { super(app, id); // A user uploads a video - const videoInputBucket = fromBucketName(this, 'VideoInputBucket', `video-input-bucket-${stage}`); - - videoInputBucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(extractAudioLambda)) - videoInputBucket.grantReadWrite(extractAudioLambda); + const videoInputBucket = s3.Bucket.fromBucketName(this, 'VideoInputBucket', `development-storage-videoinputbucket940f4f43-1du1ixen5jp8u`); + const extractedAudioBucket = s3.Bucket.fromBucketName(this, 'AudioExtractedBucket', `development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz`); const ffmpegLayer = new lambda.LayerVersion(this, 'ffmpeg-layer', { compatibleRuntimes: [ @@ -45,12 +43,17 @@ class TranscribeService extends cdk.Stack { SUPABASE_API_URL: process.env.SUPABASE_API_URL, SUPABASE_API_KEY: process.env.SUPABASE_API_KEY, VIDEO_INPUT_BUCKET: videoInputBucket.bucketArn, - EXTRACTED_VIDEO_AUDIO_BUCKET: extractAudioBucket.bucketArn + EXTRACTED_VIDEO_AUDIO_BUCKET: extractedAudioBucket.bucketArn }, layers: [ffmpegLayer] }); - const extractedAudioBucket = fromBucketName(this, 'AudioExtractedBucket', `audio-extracted-bucket-${stage}`); + videoInputBucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(extractAudioLambda)) + videoInputBucket.grantReadWrite(extractAudioLambda); + + extractedAudioBucket.grantReadWrite(extractAudioLambda); + + // For the extracted audio, dispatch a job to Assembly A.I for transcribining diff --git a/infrastructure/utils/create-lambda-function.js b/infrastructure/utils/create-lambda-function.js index 15d8212..bc697f1 100644 --- a/infrastructure/utils/create-lambda-function.js +++ b/infrastructure/utils/create-lambda-function.js @@ -16,7 +16,7 @@ const createLambdaFunction = ({ functionName, code: Code.fromAsset(codeAssetPath), handler, - runtime: Runtime.NODEJS_10_X, + runtime: Runtime.NODEJS_12_X, memorySize, timeout: timeout || cdk.Duration.seconds(60), layers, diff --git a/src/services/transcribe/extract-audio/index.ts b/src/services/transcribe/extract-audio/index.ts index b3b1de7..4b497b5 100644 --- a/src/services/transcribe/extract-audio/index.ts +++ b/src/services/transcribe/extract-audio/index.ts @@ -12,6 +12,7 @@ import { createS3Client } from "../../../utils/aws/s3"; import customConfig from './config'; import { generateUUID } from "../../../utils/uuid"; +import childProcess from 'child_process'; const createClients = (config: any) => ({ s3: createS3Client(), @@ -30,21 +31,10 @@ async function extractAudio(event, { logger }) { const config = getConfig(customConfig); const clients = createClients(config); - try { - await fs.readdir('/tmp/',async (err, files) => { - if (err) throw err; - logger.info(`do you like files ${files}`); - for (const file of files) { - await fs.unlink(path.join('/tmp/', file), err => { - if (err) throw err; - }); - } - }); - logger.info('inside the extract audio lambda') logger.info(JSON.stringify(event)); @@ -60,7 +50,7 @@ async function extractAudio(event, { logger }) { const body = blob?.Body; const videoKeyName = `/tmp/${key}`; - const audioKeyName = `/tmp/test.mp3`; + const audioKeyName = `/tmp/temp.mp3`; // @ts-ignore // defensive check later @@ -68,135 +58,82 @@ async function extractAudio(event, { logger }) { logger.info('Writing video file to temp...'); - fs.writeFileSync(videoKeyName, body); const args = [ "-i" , videoKeyName, - "-q:a", - "0", - "-map a", + "-vn", audioKeyName ]; //replace with mp4 with mp3 logger.info(`Extracting audio from video :: Video key ${inputBucket}/${key}`); - fs.readdirSync('/opt/').forEach(file => { + childProcess.execFileSync("/opt/ffmpeg", args, {}); +// + const audioBucket = 'development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz'; + + const audioName = fs.readFileSync(audioKeyName); + + fs.readdirSync('/tmp/').forEach(file => { logger.info(`opt: ${file}`); }); - - const stout = childProcess.execFileSync("/opt/ffmpeg", args, {}); -// ID (generate an ID using uuid package) -// state (starts with pending) -// videoBucketKey (location of uploaded video on s3) -// extractedAudioKey (location of extracted audio key, will be null initially) -// transcriptionState (starts with pending) -// transcriptionKey (location of transcription SRT file from Assembly.AI, will be null initially) - - logger.info(`Extracting audio from video :: Video key ${inputBucket}/${key}`); - - - const blob = await clients.s3.get({ bucket: inputBucket, key}); - logger.info(`da blob ${blob}`); - logger.info('pas the blobl') - - const body = blob?.Body?.toString(); - logger.info(`da body ${JSON.stringify(body)}`); - logger.info('pas the body') - - const videoKeyName = `/tmp/${key}`; - const audioKeyName = `/tmp/test.mp3`; - logger.info('past key anems'); - // @ts-ignore - // defensive check later + logger.info(`audioName:${audioKeyName} Reading audio file...`); + clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); + logger.info(`audioName:${audioKeyName} Writing audio file to s3 ...`); + - logger.info('Writing video file to temp...'); - if(body){ - fs.writeFileSync(videoKeyName, body); - } + logger.info('cleaning out tmp') + await fs.readdir('/tmp/',async (err, files) => { + if (err) throw err; + logger.info(files); - const args = [ - "-i" , - videoKeyName, - "-q:a", - "0", - "-map a", - audioKeyName - ]; + + for (const file of files) { + await fs.unlink(path.join('/tmp/', file), err => { + if (err) throw err; + }); + } + }); - //replace with mp4 with mp3 - logger.info(`xffmphe lahyer time`); - + // logger.info(`Retrieved video ${JSON.stringify(data)}`); - // await fs.renameSync('/opt/ffmpeg', '/tmp/ffmpeg'); - // await fs.chmodSync('/tmp/ffmpeg', '777'); - fs.readdir('/opt/ffmpeg', (err, files) => { - files.forEach(file => { - logger.info(file); - }); - }); + // // compress video + // // split video into audio + // // create audioKey + // // store audio in s3 + // // update video record with audio key - const stout = childProcess.execFileSync("/opt/ffmpeg/", args, {}); + // // const id = context.awsRequestId, + // // const resultKey = key.replace(/\.[^.]+$/, EXTENSION), + // // const workdir = os.tmpdir(), + // // const inputFile = path.join(workdir, id + path.extname(key)), + // // const outputFile = path.join(workdir, id + EXTENSION); - const audioBucket = 'development-transcribese-extractaudiobucket197901-4zaqtw7geuta'; + // // return s3Util.downloadFileFromS3(inputBucket, key, inputFile) + // // .then(() => childProcessPromise.spawn( + // // '/opt/bin/ffmpeg', + // // ['-loglevel', 'error', '-y', '-i', inputFile, '-vf', `thumbnail,scale=${THUMB_WIDTH}:-1`, '-frames:v', '1', outputFile], + // // { + // // env: process.env, + // // cwd: workdir + // // } + // // )) + // // .then(() => s3Util.uploadFileToS3(OUTPUT_BUCKET, resultKey, outputFile, MIME_TYPE)); - const audioName = fs.readFileSync(audioKeyName); - logger.info(`audoName:${audioName} Reading audio file...`); + // // development-encodeservic-videoinputbucket940f4f43-iy9if872u4ib - clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); - - const {data, error} = await clients.supabase.from('Video').insert([{ - id, - state: 'pending', - videoBucketKey: key, - extractedAudioKey: null, - transcriptionState: 'pending', - transcriptionKey: null - }]); - if (error) { - throw new Error(`Failed to retrive video upload :: ${error.message}`) - } - - logger.info(`Retrieved video ${JSON.stringify(data)}`); - - - // compress video - // split video into audio - // create audioKey - // store audio in s3 - // update video record with audio key - - // const id = context.awsRequestId, - // const resultKey = key.replace(/\.[^.]+$/, EXTENSION), - // const workdir = os.tmpdir(), - // const inputFile = path.join(workdir, id + path.extname(key)), - // const outputFile = path.join(workdir, id + EXTENSION); - - // return s3Util.downloadFileFromS3(inputBucket, key, inputFile) - // .then(() => childProcessPromise.spawn( - // '/opt/bin/ffmpeg', - // ['-loglevel', 'error', '-y', '-i', inputFile, '-vf', `thumbnail,scale=${THUMB_WIDTH}:-1`, '-frames:v', '1', outputFile], - // { - // env: process.env, - // cwd: workdir - // } - // )) - // .then(() => s3Util.uploadFileToS3(OUTPUT_BUCKET, resultKey, outputFile, MIME_TYPE)); - - // development-encodeservic-videoinputbucket940f4f43-iy9if872u4ib - - const audioBucket = 'development-encodeservice-extractaudiobucket197901-1wjvufyahi68c'; + // const audioBucket = 'development-encodeservice-extractaudiobucket197901-1wjvufyahi68c'; - const audioName = fs.readFileSync(audioKeyName); - logger.info(`audoName:${audioName} Reading audio file...`); + // const audioName = fs.readFileSync(audioKeyName); + // logger.info(`audoName:${audioName} Reading audio file...`); - clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); + // clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); // //.... rest of the logic to clear up locally written files from running the executable @@ -210,16 +147,6 @@ async function extractAudio(event, { logger }) { } catch (error) { logger.error(error); - fs.readdir('/tmp/', (err, files) => { - if (err) throw err; - - for (const file of files) { - fs.unlink(path.join('/tmp/', file), err => { - if (err) throw err; - logger.info(`Deleting ${file}`); - }); - } - }); logger.info('cleaning out tmp') await fs.readdir('/tmp/',async (err, files) => { diff --git a/yarn.lock b/yarn.lock index df89ea4..1345c2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,7 +20,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/assets@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/assets/-/assets-1.118.0.tgz#87af37ee2e3dab7111be217dcfbebf87a6f91b96" @@ -28,15 +27,6 @@ dependencies: "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/assets@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/assets/-/assets-1.128.0.tgz#90e69ee391f89a5153ac2faedd6f22e02687f3ad" - integrity sha512-/3zBV+g55kYVyDmMweFwb9wZuMXFcSonQI+luq99lAdfH4P045k9ugIVPmihtW6knJIr4q25hNAX/nJluWfxMA== - dependencies: - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-apigateway@1.110.1": @@ -125,7 +115,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-applicationautoscaling@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-applicationautoscaling/-/aws-applicationautoscaling-1.118.0.tgz#e9e5b0cd9893624787488d0df09398eb8d0411f5" @@ -135,17 +124,6 @@ "@aws-cdk/aws-cloudwatch" "1.118.0" "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-applicationautoscaling@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-applicationautoscaling/-/aws-applicationautoscaling-1.128.0.tgz#2a4ee31becf4e6bb08909f931d1286a2cfa4830e" - integrity sha512-qnDYT46NYXwf4iO1eo27y37DflO+Z3vT//StLPjEf/cdteyOCT4pXAzLqjTbfzKv95pLQ1vzCiKfF2bMXbh4Kw== - dependencies: - "@aws-cdk/aws-autoscaling-common" "1.128.0" - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-autoscaling-common@1.107.0": @@ -166,7 +144,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-autoscaling-common@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-autoscaling-common/-/aws-autoscaling-common-1.118.0.tgz#72efd8f65de63c641bb619b941c57c60875cf4f2" @@ -174,15 +151,6 @@ dependencies: "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-autoscaling-common@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-autoscaling-common/-/aws-autoscaling-common-1.128.0.tgz#0f15632e578af8e78327041b0894955dfc222e00" - integrity sha512-aJarS8daAT0dD8QeuuKYgvzFv3HHgu06XEmAuvL1okeMN375qECX5/GWWIhpZtwUv6P+MdU9rckfYPonrohlBQ== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-certificatemanager@1.107.0": @@ -267,7 +235,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-cloudwatch@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-cloudwatch/-/aws-cloudwatch-1.118.0.tgz#50d18d8804360280a9198a09907bbee843549bd4" @@ -275,15 +242,6 @@ dependencies: "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-cloudwatch@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-cloudwatch/-/aws-cloudwatch-1.128.0.tgz#dc73edd74407349f0fbe0501b3c3f7ce09d5e18d" - integrity sha512-BzYOZ2aS6WZGYUSlXoo37f0xbYACzO+hM8foFOYkYFNEMbyDNe4w2AB6j1rhi3Btm8agnVbKVkUdwZtYnjuPyQ== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-codeguruprofiler@1.107.0": @@ -304,7 +262,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-codeguruprofiler@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-codeguruprofiler/-/aws-codeguruprofiler-1.118.0.tgz#f13929a88a28a21a8168aac0e4355f839d49c4c4" @@ -312,15 +269,6 @@ dependencies: "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-codeguruprofiler@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-codeguruprofiler/-/aws-codeguruprofiler-1.128.0.tgz#9aab263da8f4f4ef4d4f46e1e8ed90f4674c7ff3" - integrity sha512-qOisno4iB5qaiTZDvi3QLKokXbDcTqRTRlsdOezcoDjc+Ua2RFO+O4Nn+Dq/gHV8RQtillcbPn7O0ZorsKM+MQ== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-codestarnotifications@1.110.1": @@ -331,21 +279,12 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-codestarnotifications@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-codestarnotifications/-/aws-codestarnotifications-1.118.0.tgz#267d99c2628685baa6b038f7829da256dd99d3d2" integrity sha512-zKgVbpcAemCHNAGfuZh+HP18cPOfREowFlZMHQ+/RO7Rk2mG23N7iqdH2X+B/SQxUZ1gQ7AsDNvO8qeWmE4kXw== dependencies: "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-codestarnotifications@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-codestarnotifications/-/aws-codestarnotifications-1.128.0.tgz#ffaa12b46ecf86b561ab7b4ebb446405e476568f" - integrity sha512-mPJWPj0eKqWu7sIYzTmufrRaaApFTCiT7W8iDGxVcqB6nwHKrTj5R+hyd/5E3JEpejaDxXwr6b3SThBYLQxLFg== - dependencies: - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-cognito@1.107.0", "@aws-cdk/aws-cognito@^1.95.1": @@ -439,7 +378,6 @@ "@aws-cdk/region-info" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-ec2@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ec2/-/aws-ec2-1.118.0.tgz#d83753e4d7f18d86d1523a197d80e11c51086e36" @@ -456,24 +394,6 @@ "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" "@aws-cdk/region-info" "1.118.0" -======= -"@aws-cdk/aws-ec2@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ec2/-/aws-ec2-1.128.0.tgz#d05dcd184f1b508056e4e4899144228ced89c842" - integrity sha512-VC7y0d/XvBTNMhkVaqKWyeO7cKeErrNjoYWaPk1SOxw9TPS+xcRo/NF3ED4zSl7zJ9RrJOzrVSx2yAuQXte6EA== - dependencies: - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/aws-logs" "1.128.0" - "@aws-cdk/aws-s3" "1.128.0" - "@aws-cdk/aws-s3-assets" "1.128.0" - "@aws-cdk/aws-ssm" "1.128.0" - "@aws-cdk/cloud-assembly-schema" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" - "@aws-cdk/region-info" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-ecr-assets@1.107.0": @@ -504,7 +424,6 @@ constructs "^3.3.69" minimatch "^3.0.4" -<<<<<<< HEAD "@aws-cdk/aws-ecr-assets@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ecr-assets/-/aws-ecr-assets-1.118.0.tgz#2091b5ebb2e3f66b6f8e439772d14a08f48e8b82" @@ -516,19 +435,6 @@ "@aws-cdk/aws-s3" "1.118.0" "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/aws-ecr-assets@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ecr-assets/-/aws-ecr-assets-1.128.0.tgz#07da16b61a41e849363f2f202875b618a192d7d3" - integrity sha512-6U5G4HxMUycvZi4fScKkz2DIdeWWE/Zu39J4CGMXzFueCFIi4GmmTrzXJu4sNQ5w3IGwjFFRfqAIa3xVAF1WVg== - dependencies: - "@aws-cdk/assets" "1.128.0" - "@aws-cdk/aws-ecr" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-s3" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" minimatch "^3.0.4" @@ -552,7 +458,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-ecr@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ecr/-/aws-ecr-1.118.0.tgz#25f16b4e8dbd5816357bedb044e7af985936701a" @@ -571,16 +476,6 @@ "@aws-cdk/aws-events" "1.116.0" "@aws-cdk/aws-iam" "1.116.0" "@aws-cdk/core" "1.116.0" -======= -"@aws-cdk/aws-ecr@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ecr/-/aws-ecr-1.128.0.tgz#c0b48e43ca6626ea4ba8c34e01d1419788216d0d" - integrity sha512-v8HFIoHIbCAlwZEPyy8Jyp5wBHpCazGrIBBh6r4n/kr3PzBno8ClPA8gm/752yiCie0SmJJqtlvarhApIvs3gg== - dependencies: - "@aws-cdk/aws-events" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-efs@1.107.0": @@ -607,7 +502,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-efs@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-efs/-/aws-efs-1.118.0.tgz#4fb58686608eb91a7e8e0934ecc30997c5a423c1" @@ -619,19 +513,6 @@ "@aws-cdk/cloud-assembly-schema" "1.118.0" "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/aws-efs@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-efs/-/aws-efs-1.128.0.tgz#595ff094e5c00a47ad6ea80aeb9784557aa4b487" - integrity sha512-nBHwEHl9xKglVheu6Dqv3SEYcELcBQo/JcYcG90gokfaytzI48KrCf9LX1zgZ9eSaqaeohP+H7QP0LJvxA1u5w== - dependencies: - "@aws-cdk/aws-ec2" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/cloud-assembly-schema" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-elasticbeanstalk@^1.97.0": @@ -694,7 +575,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-events@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-events/-/aws-events-1.116.0.tgz#22e9f0f0af56d585d920774227f446d8051d2ebb" @@ -711,15 +591,15 @@ dependencies: "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-events@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-events/-/aws-events-1.128.0.tgz#492c6ed6e216a35953d370a451edb5d6153a5c87" - integrity sha512-45l2B/8n3YDowfkj4cF3PU7CMehLQ1LlECTn9Wo5goWPROnNNOsdq+FQNqYOz3rO3f2eQKVjW2k8UAFMh7Ze3Q== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + constructs "^3.3.69" + +"@aws-cdk/aws-events@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/aws-events/-/aws-events-1.130.0.tgz#537866ae5f6cc7076f5319c564623852f3ce9a28" + integrity sha512-bc2kZjGnDIdT0W0NSpD/7MR71nSLQx/I/tLE/2tAckjiYrPrFnTIwkujlYfrJcQbMQ+6Kh59jcuhLYc0lR8ung== + dependencies: + "@aws-cdk/aws-iam" "1.130.0" + "@aws-cdk/core" "1.130.0" constructs "^3.3.69" "@aws-cdk/aws-iam@1.107.0", "@aws-cdk/aws-iam@^1.51.0": @@ -740,7 +620,6 @@ "@aws-cdk/region-info" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-iam@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-iam/-/aws-iam-1.116.0.tgz#8f9b7a76cf76c7728d1aa8d5895a31f369846198" @@ -757,15 +636,15 @@ dependencies: "@aws-cdk/core" "1.118.0" "@aws-cdk/region-info" "1.118.0" -======= -"@aws-cdk/aws-iam@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-iam/-/aws-iam-1.128.0.tgz#3d50e0b6c0138b9d4e47b07453d6ce29b7107bf2" - integrity sha512-1pF73b4mjEO3jPcXFq53C4uYUXdncnWgS4gqcdtDr02XG26s2yR6YJHqwMjPY5Qg3onbw8E1glKfREu5+UhXTQ== - dependencies: - "@aws-cdk/core" "1.128.0" - "@aws-cdk/region-info" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + constructs "^3.3.69" + +"@aws-cdk/aws-iam@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/aws-iam/-/aws-iam-1.130.0.tgz#c4dfe3772f2381527b3fd49331c214562fb3c044" + integrity sha512-tksJnHdFvlhWmjQzEUWEQuqgC1VZTaDdhBLX99P9y8h0tq1fwq8IzOWXlq1hrs8gDtuAVf4UsksO6pUuvXd0Wg== + dependencies: + "@aws-cdk/core" "1.130.0" + "@aws-cdk/region-info" "1.130.0" constructs "^3.3.69" "@aws-cdk/aws-kinesis@1.110.1": @@ -800,7 +679,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-kms@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-kms/-/aws-kms-1.118.0.tgz#4f72d0f32abbeba03b244840b1124cda1c2f4acb" @@ -809,17 +687,17 @@ "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/aws-kms@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-kms/-/aws-kms-1.128.0.tgz#a98c3ebfe010c56596cc76af6456187dc56d329c" - integrity sha512-9/55JpvEJVnYezC8BlL2tK6I2GL8lE6fCRtTL/Qj6DjcylkVSeNIhISf3x2ZLz04YG+ksqHEIz1cz2Ar2U28hg== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/cloud-assembly-schema" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + constructs "^3.3.69" + +"@aws-cdk/aws-kms@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/aws-kms/-/aws-kms-1.130.0.tgz#bd85bbcfffbce26d9cc260f3ad7869c761a2edec" + integrity sha512-AJSKHb7a92jtca46LWS58vDoAQN8x6xPWffX3vb3ONdcASe2p+t73xhuasIBJUGXUVLnpCTxL5Oe633B2teW9A== + dependencies: + "@aws-cdk/aws-iam" "1.130.0" + "@aws-cdk/cloud-assembly-schema" "1.130.0" + "@aws-cdk/core" "1.130.0" + "@aws-cdk/cx-api" "1.130.0" constructs "^3.3.69" "@aws-cdk/aws-lambda-event-sources@^1.110.1": @@ -891,7 +769,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-lambda@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-lambda/-/aws-lambda-1.118.0.tgz#78b769a2c19ed31b4d01c09b40f4390b2c419396" @@ -915,31 +792,6 @@ "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" "@aws-cdk/region-info" "1.118.0" -======= -"@aws-cdk/aws-lambda@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-lambda/-/aws-lambda-1.128.0.tgz#0514e551aa6728352d9a477f19030fa7a89e33f9" - integrity sha512-BbiyP/BgRQrwHhC85GRr0L+TRCW7GjuxxgE51GiBgSm6WTxCoGHWaojp37sVz8mJTXTFsfd5JXBHn790Elpiuw== - dependencies: - "@aws-cdk/aws-applicationautoscaling" "1.128.0" - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-codeguruprofiler" "1.128.0" - "@aws-cdk/aws-ec2" "1.128.0" - "@aws-cdk/aws-ecr" "1.128.0" - "@aws-cdk/aws-ecr-assets" "1.128.0" - "@aws-cdk/aws-efs" "1.128.0" - "@aws-cdk/aws-events" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/aws-logs" "1.128.0" - "@aws-cdk/aws-s3" "1.128.0" - "@aws-cdk/aws-s3-assets" "1.128.0" - "@aws-cdk/aws-signer" "1.128.0" - "@aws-cdk/aws-sqs" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" - "@aws-cdk/region-info" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-logs@1.107.0": @@ -966,7 +818,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-logs@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-logs/-/aws-logs-1.118.0.tgz#1a922cb82a70f7249444feb5a6c94b7b35e2dfcc" @@ -977,18 +828,6 @@ "@aws-cdk/aws-kms" "1.118.0" "@aws-cdk/aws-s3-assets" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-logs@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-logs/-/aws-logs-1.128.0.tgz#a59999f153263b2facd2dacad0c24830935e9c42" - integrity sha512-3jGIQAvrvU4kyuQ1EGa7dIY9GP+rmd5wj43KUdLXRNKXkdykod1OSUPoqmS8ny4NSOmgYgfxHxRuoyajimw9Uw== - dependencies: - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/aws-s3-assets" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-rds@^1.51.0": @@ -1060,7 +899,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-s3-assets@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3-assets/-/aws-s3-assets-1.118.0.tgz#d4dbda5aa725e8b2d88f23315d5cbfd95099b045" @@ -1072,19 +910,6 @@ "@aws-cdk/aws-s3" "1.118.0" "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/aws-s3-assets@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3-assets/-/aws-s3-assets-1.128.0.tgz#45980b14cbfd9f659df87310f5f037b04c3542ed" - integrity sha512-VySvr7/aGCKX247JKOfkr0DeUBIqycXyVkLwbllF1IpJ/lFOlnnjRW0ZSigz+S+kO0EohjsFNaqlrxxkueYyPQ== - dependencies: - "@aws-cdk/assets" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/aws-s3" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-s3-notifications@1.110.1": @@ -1100,7 +925,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-s3-notifications@^1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3-notifications/-/aws-s3-notifications-1.118.0.tgz#a36d0dc4b1dd7bd7ab23bbe4da655c8fe579170c" @@ -1112,22 +936,9 @@ "@aws-cdk/aws-sns" "1.118.0" "@aws-cdk/aws-sqs" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-s3-notifications@^1.51.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3-notifications/-/aws-s3-notifications-1.128.0.tgz#60e4b28e70a5a104b1fd26735aa1cfb68aa73fd6" - integrity sha512-feGWrI+25eWpmW5vKGfe0mH+JGiugTHKq0/KStghYHVKnj5COOTS0GYsTnvG5EY9VgwLZwKAIxac+g3iqLNMhw== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-lambda" "1.128.0" - "@aws-cdk/aws-s3" "1.128.0" - "@aws-cdk/aws-sns" "1.128.0" - "@aws-cdk/aws-sqs" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" -"@aws-cdk/aws-s3@1.107.0", "@aws-cdk/aws-s3@^1.51.0": +"@aws-cdk/aws-s3@1.107.0": version "1.107.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3/-/aws-s3-1.107.0.tgz#54914b5171d44f9f70fed764195bce735ac22b36" integrity sha512-BjH9S+ZlFHoqRDRT/I8m3MFB+80F6mHASMnKHuyXoMfUs8qMos7R8XEJAprx/dMf5EwAMfFYS0IFZH21CpBlxw== @@ -1151,7 +962,6 @@ "@aws-cdk/cx-api" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-s3@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3/-/aws-s3-1.118.0.tgz#4251f300bb099e678a95a603617ad49ea145a037" @@ -1162,18 +972,18 @@ "@aws-cdk/aws-kms" "1.118.0" "@aws-cdk/core" "1.118.0" "@aws-cdk/cx-api" "1.118.0" -======= -"@aws-cdk/aws-s3@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3/-/aws-s3-1.128.0.tgz#1eb5588f5a9ee5328a2baa3b4c73ba1b39877a4a" - integrity sha512-o1um24GMy3/lGv2O2YnZciStLBbf67epAlE5OvZZIPscikif/o4/n7dUKmEzGjP4bzP0uKUjemsNVqBRmvfPvw== - dependencies: - "@aws-cdk/aws-events" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/core" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + constructs "^3.3.69" + +"@aws-cdk/aws-s3@^1.51.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/aws-s3/-/aws-s3-1.130.0.tgz#6e78721a7e524a5f99ca51a1f4eadcdd0cdd3132" + integrity sha512-GMNDeToY/K32BijI76ky2oe9vFemLgl9tL7iZPRPOc15QwXVFa8lZah7UL9ZVEpfsRSzfV04k+Y0M+gtGk9JZw== + dependencies: + "@aws-cdk/aws-events" "1.130.0" + "@aws-cdk/aws-iam" "1.130.0" + "@aws-cdk/aws-kms" "1.130.0" + "@aws-cdk/core" "1.130.0" + "@aws-cdk/cx-api" "1.130.0" constructs "^3.3.69" "@aws-cdk/aws-sam@1.107.0": @@ -1247,21 +1057,12 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-signer@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-signer/-/aws-signer-1.118.0.tgz#03adb72cea6d64d961f5d86c1926779e5aa36dcc" integrity sha512-0rZTTRbNzpBBhb8xTQeHXQgRGhcJeYCvUsxb2rOElRW0mlCD0//QdtG5QhMi+3BrYe5Lu6BAPZBgBh+Sd1o6Bw== dependencies: "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-signer@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-signer/-/aws-signer-1.128.0.tgz#87eb7b21c9ceba32316386006453f671b94ab192" - integrity sha512-y6xmzrIGynemQeB7EZy0xrpxsrrgCbXUnbdKBasKIEz7hjewE6Uy7JGoDzfNWrA0P3093OWET4pdNd9aSj/vNA== - dependencies: - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-sns-subscriptions@1.110.1": @@ -1315,7 +1116,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-sns@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-sns/-/aws-sns-1.118.0.tgz#0a15a6f7669e31a6a90c243a758acd1fa20c2ebe" @@ -1328,20 +1128,6 @@ "@aws-cdk/aws-kms" "1.118.0" "@aws-cdk/aws-sqs" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-sns@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-sns/-/aws-sns-1.128.0.tgz#1f70cf006368e674b9f6c9c07f5459869f5c2cc4" - integrity sha512-z7IsuBrNQZQb3JZXSORcAevu4Bl0cc7D2YVsX/yoy1KT89G8Cxz0KcACyoUt/GEB4y4Imxw9IJJpBFS9rBXQew== - dependencies: - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-codestarnotifications" "1.128.0" - "@aws-cdk/aws-events" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/aws-sqs" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-sqs@1.107.0", "@aws-cdk/aws-sqs@^1.51.0": @@ -1366,7 +1152,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-sqs@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-sqs/-/aws-sqs-1.118.0.tgz#6879532775625e17224d0dd1cd9e40b9f533b90e" @@ -1376,17 +1161,6 @@ "@aws-cdk/aws-iam" "1.118.0" "@aws-cdk/aws-kms" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-sqs@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-sqs/-/aws-sqs-1.128.0.tgz#3b3373d2d229c05c56eac1b00845c7baa827d8e1" - integrity sha512-6QImtGovn/Lv59/801y5PqhSPa/6hKPtahA4X0BJY5/3whu1K+mtteCerNy216ZoTCjKSpWYdPyK8sPN1kMLew== - dependencies: - "@aws-cdk/aws-cloudwatch" "1.128.0" - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/aws-ssm@1.107.0", "@aws-cdk/aws-ssm@^1.51.0": @@ -1411,7 +1185,6 @@ "@aws-cdk/core" "1.110.1" constructs "^3.3.69" -<<<<<<< HEAD "@aws-cdk/aws-ssm@1.118.0": version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ssm/-/aws-ssm-1.118.0.tgz#d09086d88a5b0b10614e372e12b478630e8cc513" @@ -1421,17 +1194,6 @@ "@aws-cdk/aws-kms" "1.118.0" "@aws-cdk/cloud-assembly-schema" "1.118.0" "@aws-cdk/core" "1.118.0" -======= -"@aws-cdk/aws-ssm@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-ssm/-/aws-ssm-1.128.0.tgz#5b4d144fb3e06d119b8bafd139ea8a7031ccae76" - integrity sha512-m24FTuK+fDwP1uHs2OopKmvkVTQcKk8oIBpzbESCqtbr7LtnzriH88R4jnpL+aCqv24sfWR1foJRbAgWBcBNKA== - dependencies: - "@aws-cdk/aws-iam" "1.128.0" - "@aws-cdk/aws-kms" "1.128.0" - "@aws-cdk/cloud-assembly-schema" "1.128.0" - "@aws-cdk/core" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a constructs "^3.3.69" "@aws-cdk/cfnspec@1.107.0": @@ -1457,7 +1219,6 @@ jsonschema "^1.4.0" semver "^7.3.5" -<<<<<<< HEAD "@aws-cdk/cloud-assembly-schema@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.116.0.tgz#be164dd3d69edd955a36f2d238ad68cf73022683" @@ -1470,12 +1231,14 @@ version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.118.0.tgz#768fe56a61daace0d360cc548993016f21492b7c" integrity sha512-Bmxftbl/SScafJJio2+hQiNdPqvydouzqGtW9xdtL0/T8m5pi7nmV4PG+wCafPGEJA66A56b5CGk/svL/CSj4g== -======= -"@aws-cdk/cloud-assembly-schema@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.128.0.tgz#7089178f36dbf15439d477db820bd0021025a55f" - integrity sha512-rKyPTcGbk0ph6xJFzYe2rDCL/c8a+Yp2nTYqa53jK+X0YqDGzLiaVFnnnUGqE8gafHTOA09w+6DBQm+/E0Ea2A== ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + dependencies: + jsonschema "^1.4.0" + semver "^7.3.5" + +"@aws-cdk/cloud-assembly-schema@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.130.0.tgz#ccb0450263ca9d6ec9326e3c8ddb3880ac501bab" + integrity sha512-FewdApVM5N4BwNn23VeiIA6EgD6CZP1tV0wZAsxU+xXl4CwsfhyeAsmTVeHvf4+g+N7j5BBp+q2d1bkSesdZWw== dependencies: jsonschema "^1.4.0" semver "^7.3.5" @@ -1521,7 +1284,6 @@ ignore "^5.1.8" minimatch "^3.0.4" -<<<<<<< HEAD "@aws-cdk/core@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/core/-/core-1.116.0.tgz#09de1dc6b01737977c40c5ed2c45eb6e109eae22" @@ -1544,16 +1306,20 @@ "@aws-cdk/cloud-assembly-schema" "1.118.0" "@aws-cdk/cx-api" "1.118.0" "@aws-cdk/region-info" "1.118.0" -======= -"@aws-cdk/core@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/core/-/core-1.128.0.tgz#0d08ce07ea7407ac9a732e9d3d094307776961c8" - integrity sha512-OFj2LaCWOk8qh/ddxYYCf6l8bzXceO74BDkwfnAX+N5CJHen201wSqYlLiq9yFRm/c/lfCkVtgf6dTaz+PdQGQ== - dependencies: - "@aws-cdk/cloud-assembly-schema" "1.128.0" - "@aws-cdk/cx-api" "1.128.0" - "@aws-cdk/region-info" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + "@balena/dockerignore" "^1.0.2" + constructs "^3.3.69" + fs-extra "^9.1.0" + ignore "^5.1.8" + minimatch "^3.0.4" + +"@aws-cdk/core@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/core/-/core-1.130.0.tgz#a3e0825d056e7a4d3cd3fe4a3b1ebc3f4d6f48bf" + integrity sha512-AGTIC25bcRtRdF2ttPSfZOgUCTI3hJ5OgyF6jt3pPajQ+uEgdvkRQuJKYXd9dmEX+CxlaXcKl+mA5O+RSRVQ/A== + dependencies: + "@aws-cdk/cloud-assembly-schema" "1.130.0" + "@aws-cdk/cx-api" "1.130.0" + "@aws-cdk/region-info" "1.130.0" "@balena/dockerignore" "^1.0.2" constructs "^3.3.69" fs-extra "^9.1.0" @@ -1604,7 +1370,6 @@ "@aws-cdk/cloud-assembly-schema" "1.110.1" semver "^7.3.5" -<<<<<<< HEAD "@aws-cdk/cx-api@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/cx-api/-/cx-api-1.116.0.tgz#5ec0227bf764be552f5ed9db242d41b3f21655f5" @@ -1619,14 +1384,14 @@ integrity sha512-pNeuxHPmJjUvLIr89J4uMt8c2JkiuclgZ1JBilot+dFD8GAb0RhxhtfSnA3scOB/Lnnd0Qf4UQhKsd5vqEdqAA== dependencies: "@aws-cdk/cloud-assembly-schema" "1.118.0" -======= -"@aws-cdk/cx-api@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/cx-api/-/cx-api-1.128.0.tgz#ef91630a8b007808c624208a102ef0b09f9ade46" - integrity sha512-1lLRM+VxaljK9RaxvtnkR+gSh/KI10NRHZCFhYzKQcd/kDwBkrylU+YBqWzS8MlSITaxTpYFZtHwUXRBxCnJYA== - dependencies: - "@aws-cdk/cloud-assembly-schema" "1.128.0" ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + semver "^7.3.5" + +"@aws-cdk/cx-api@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cx-api/-/cx-api-1.130.0.tgz#71693e08357c653e7e19c012a5f3cfcf265d42e7" + integrity sha512-YU5zJ1D4X4CJbEvUOvOqIQYAht7ockCp0en/hKH+2TZPoJLTRQZvCJvlcVxoYM1O9RTlAzqa5bhRnMhbdo9ceQ== + dependencies: + "@aws-cdk/cloud-assembly-schema" "1.130.0" semver "^7.3.5" "@aws-cdk/region-info@1.107.0": @@ -1639,7 +1404,6 @@ resolved "https://registry.yarnpkg.com/@aws-cdk/region-info/-/region-info-1.110.1.tgz#27eec01f1db9768bdbbfe2037c3e65d9b372b74f" integrity sha512-sRRTO2qH8kWsh4s62bKTmk9IU8uXYmRJHkOjWo6RUC/W0sv7S6VeB1XHZ7QReDF3woJ/n3oPJzsf/bu33m4l+g== -<<<<<<< HEAD "@aws-cdk/region-info@1.116.0": version "1.116.0" resolved "https://registry.yarnpkg.com/@aws-cdk/region-info/-/region-info-1.116.0.tgz#8185a07d90530e3da569798d9281a5b6181d5fa6" @@ -1649,12 +1413,11 @@ version "1.118.0" resolved "https://registry.yarnpkg.com/@aws-cdk/region-info/-/region-info-1.118.0.tgz#a6e127c3723a7edea85c3df0031a06d132b870e0" integrity sha512-7hudA/zfCsDw0DIDu/Cc4+UJjW6aC0y4Mp7AmxlxkziXIEZi3KvSXwR2IBmKV+pSWMvMZYTiPJIgLLqB+moFgQ== -======= -"@aws-cdk/region-info@1.128.0": - version "1.128.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/region-info/-/region-info-1.128.0.tgz#2adf18e846c85fd1dfcdce2bed98d3461c4f034c" - integrity sha512-84QbxbmfYeoRDC7X5KNQ91sXNDBomb7c63VPPuxm9PS65haufEEqHvesJ66YBFTXky+MBrUSRyANdv4M4CDPrQ== ->>>>>>> c010e2ac54a9e794432a85219b97222b28d2762a + +"@aws-cdk/region-info@1.130.0": + version "1.130.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/region-info/-/region-info-1.130.0.tgz#de81636cc491bb898410841a794c786002b47a29" + integrity sha512-nIrZau6X+nxaaZsTLwkz7b1RUqT0bJwNFEA/6s7cV2syjK/A2+Xs8Lq031Mj4uchaSdpWsFFBVROHShCikzaFA== "@babel/cli@^7.8.3": version "7.13.16" From 2803964c934f73c95d2c4276e34c4f14bbab0fb3 Mon Sep 17 00:00:00 2001 From: rex Date: Sat, 6 Nov 2021 18:56:54 -0400 Subject: [PATCH 2/5] chore: refactor write to audio extract lmabda --- ...evelopment-TranscribeService.template.json | 20 ++--- cdk.out/manifest.json | 24 +++--- cdk.out/tree.json | 18 ++-- .../transcribe/extract-audio/index.ts | 86 ++----------------- src/utils/clean-out-tmp.ts | 17 ++++ 5 files changed, 54 insertions(+), 111 deletions(-) create mode 100644 src/utils/clean-out-tmp.ts diff --git a/cdk.out/development-TranscribeService.template.json b/cdk.out/development-TranscribeService.template.json index 6e26c81..7e4db6d 100644 --- a/cdk.out/development-TranscribeService.template.json +++ b/cdk.out/development-TranscribeService.template.json @@ -251,7 +251,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C" }, "S3Key": { "Fn::Join": [ @@ -264,7 +264,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" } ] } @@ -277,7 +277,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" } ] } @@ -342,7 +342,7 @@ ], "Metadata": { "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/Resource", - "aws:asset:path": "asset.e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14.zip", + "aws:asset:path": "asset.27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee.zip", "aws:asset:property": "Code" } }, @@ -458,17 +458,17 @@ "Type": "String", "Description": "Artifact hash for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" }, - "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE": { + "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C": { "Type": "String", - "Description": "S3 bucket for asset \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" + "Description": "S3 bucket for asset \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" }, - "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49": { + "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C": { "Type": "String", - "Description": "S3 key for asset version \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" + "Description": "S3 key for asset version \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" }, - "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513": { + "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1": { "Type": "String", - "Description": "Artifact hash for asset \"e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14\"" + "Description": "Artifact hash for asset \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" } }, "Conditions": { diff --git a/cdk.out/manifest.json b/cdk.out/manifest.json index cc9c328..1c9fa80 100644 --- a/cdk.out/manifest.json +++ b/cdk.out/manifest.json @@ -319,13 +319,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14.zip", - "id": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", + "path": "asset.27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee.zip", + "id": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", "packaging": "file", - "sourceHash": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", - "s3BucketParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE", - "s3KeyParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49", - "artifactHashParameter": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513" + "sourceHash": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", + "s3BucketParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C", + "s3KeyParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C", + "artifactHashParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1" }, "trace": [ "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", @@ -476,10 +476,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3Bucket": [ + "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE", + "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -501,10 +501,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3VersionKey": [ + "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49", + "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -526,10 +526,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/ArtifactHash": [ + "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14ArtifactHash701E2513", + "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", diff --git a/cdk.out/tree.json b/cdk.out/tree.json index bbb49b7..0f06088 100644 --- a/cdk.out/tree.json +++ b/cdk.out/tree.json @@ -510,13 +510,13 @@ "version": "1.107.0" } }, - "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14": { - "id": "e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", - "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14", + "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee": { + "id": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", + "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3Bucket", + "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -524,7 +524,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/S3VersionKey", + "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -532,7 +532,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/e19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14/ArtifactHash", + "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -745,7 +745,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3BucketBB3273BE" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C" }, "s3Key": { "Fn::Join": [ @@ -758,7 +758,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" } ] } @@ -771,7 +771,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterse19a78f757726288a3715b42393a16832e472b22051244a66439bc0940b1bc14S3VersionKey3D1DCE49" + "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" } ] } diff --git a/src/services/transcribe/extract-audio/index.ts b/src/services/transcribe/extract-audio/index.ts index 4b497b5..c747f77 100644 --- a/src/services/transcribe/extract-audio/index.ts +++ b/src/services/transcribe/extract-audio/index.ts @@ -1,4 +1,4 @@ -import uuidv4 from "uuid/v4"; +import { v4 as uuidv4 } from "uuid"; import fs from "fs"; import path from "path"; import os from "os"; @@ -13,6 +13,7 @@ import { createS3Client } from "../../../utils/aws/s3"; import customConfig from './config'; import { generateUUID } from "../../../utils/uuid"; import childProcess from 'child_process'; +import cleanOutTmp from "../../../utils/clean-out-tmp"; const createClients = (config: any) => ({ s3: createS3Client(), @@ -52,10 +53,6 @@ async function extractAudio(event, { logger }) { const videoKeyName = `/tmp/${key}`; const audioKeyName = `/tmp/temp.mp3`; - // @ts-ignore - // defensive check later - - logger.info('Writing video file to temp...'); fs.writeFileSync(videoKeyName, body); @@ -82,85 +79,14 @@ async function extractAudio(event, { logger }) { logger.info(`audioName:${audioKeyName} Reading audio file...`); - clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); + await clients.s3.put({ file: audioName, bucket: audioBucket, key: `${uuidv4()}-temp.mp3`}); logger.info(`audioName:${audioKeyName} Writing audio file to s3 ...`); - - - logger.info('cleaning out tmp') - await fs.readdir('/tmp/',async (err, files) => { - if (err) throw err; - logger.info(files); - - - for (const file of files) { - await fs.unlink(path.join('/tmp/', file), err => { - if (err) throw err; - }); - } - }); - - // logger.info(`Retrieved video ${JSON.stringify(data)}`); - - - // // compress video - // // split video into audio - // // create audioKey - // // store audio in s3 - // // update video record with audio key - - // // const id = context.awsRequestId, - // // const resultKey = key.replace(/\.[^.]+$/, EXTENSION), - // // const workdir = os.tmpdir(), - // // const inputFile = path.join(workdir, id + path.extname(key)), - // // const outputFile = path.join(workdir, id + EXTENSION); - - // // return s3Util.downloadFileFromS3(inputBucket, key, inputFile) - // // .then(() => childProcessPromise.spawn( - // // '/opt/bin/ffmpeg', - // // ['-loglevel', 'error', '-y', '-i', inputFile, '-vf', `thumbnail,scale=${THUMB_WIDTH}:-1`, '-frames:v', '1', outputFile], - // // { - // // env: process.env, - // // cwd: workdir - // // } - // // )) - // // .then(() => s3Util.uploadFileToS3(OUTPUT_BUCKET, resultKey, outputFile, MIME_TYPE)); - - // // development-encodeservic-videoinputbucket940f4f43-iy9if872u4ib - - // const audioBucket = 'development-encodeservice-extractaudiobucket197901-1wjvufyahi68c'; - - // const audioName = fs.readFileSync(audioKeyName); - // logger.info(`audoName:${audioName} Reading audio file...`); - - // clients.s3.put({ file: audioName, bucket: audioBucket, key: audioKeyName }); - - // //.... rest of the logic to clear up locally written files from running the executable - - - // // compress video - // // split video into audio - // // create audioKey - // // store audio in s3 - // // update video record with audio key - - + cleanOutTmp(logger); + } catch (error) { logger.error(error); - - logger.info('cleaning out tmp') - await fs.readdir('/tmp/',async (err, files) => { - if (err) throw err; - logger.info(files); - - - for (const file of files) { - await fs.unlink(path.join('/tmp/', file), err => { - if (err) throw err; - }); - } - }); - + cleanOutTmp(logger); throw error; } } diff --git a/src/utils/clean-out-tmp.ts b/src/utils/clean-out-tmp.ts new file mode 100644 index 0000000..4e3fe0b --- /dev/null +++ b/src/utils/clean-out-tmp.ts @@ -0,0 +1,17 @@ +import fs from "fs"; +import logger from "./logger"; +import path from "path"; + + +export default async function cleanOutTmp(logger) { + logger.info('cleaning out /tmp'); + await fs.readdir('/tmp/',async (err, files) => { + if (err) throw err; + logger.info(files); + for (const file of files) { + await fs.unlink(path.join('/tmp/', file), err => { + if (err) throw err; + }); + } + }); +} \ No newline at end of file From de0a33682f1ff7367fd56344f5fb7f88e3afb15c Mon Sep 17 00:00:00 2001 From: rex Date: Sat, 6 Nov 2021 23:38:49 -0400 Subject: [PATCH 3/5] feat: add put toadd object into table --- ...evelopment-TranscribeService.template.json | 63 ++++++++++++++--- cdk.out/manifest.json | 58 ++++++++-------- cdk.out/tree.json | 67 ++++++++++++++++--- infrastructure/services/transcribe/index.js | 5 ++ package.json | 3 +- .../transcribe/extract-audio/index.ts | 28 +++++++- src/utils/aws/dynamodb.ts | 50 ++++++++++++++ yarn.lock | 5 ++ 8 files changed, 226 insertions(+), 53 deletions(-) create mode 100644 src/utils/aws/dynamodb.ts diff --git a/cdk.out/development-TranscribeService.template.json b/cdk.out/development-TranscribeService.template.json index 7e4db6d..dfeb762 100644 --- a/cdk.out/development-TranscribeService.template.json +++ b/cdk.out/development-TranscribeService.template.json @@ -231,6 +231,47 @@ ] } ] + }, + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/development-videos" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] } ], "Version": "2012-10-17" @@ -251,7 +292,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA" }, "S3Key": { "Fn::Join": [ @@ -264,7 +305,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" } ] } @@ -277,7 +318,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" } ] } @@ -342,7 +383,7 @@ ], "Metadata": { "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/Resource", - "aws:asset:path": "asset.27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee.zip", + "aws:asset:path": "asset.1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1.zip", "aws:asset:property": "Code" } }, @@ -437,7 +478,7 @@ "CDKMetadata": { "Type": "AWS::CDK::Metadata", "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAAE41QwWrDMAz9lt4VNSEbu24t7LRDSWF3zVGLm9gGy14pxv++2F0Zue2k93iS3pM6TF37gu3mla7SqHHaJuU8YzoGUhO8iXBY4FnbMwwsLnrFsHdWgo8qwP5kD+TJcGBfyF/LyS5dow7a2Qxld5rJfI2EqcywN1pk0eCDbuw/2VeySCv+Hq0Kv8IDZ5C+oZJLsMYDTQbT4ObqWuvBzVrdarqKcs7Q9e3qzJpJetxFNXHYkfC/FsH9PasXPK4uNtaNjBfZfndP2D1jv7mI1o2PNmjDONzrD/dXZIB2AQAA" + "Analytics": "v2:deflate64:H4sIAAAAAAAAE41QTWvDMAz9Lb07akw2dt1a6GmHksHumqMVN7ENlt1SjP/7bHcd5LaT3tPTx5MkJNm/QL95xSt3apq3STlPkD4CqlmMxC56ReKNmULJnbQ9ib2zHHxUQey/7RE9GgrkK/mrL7hUTTpoZ7Oos9OC5mtCSLWHvNHMRRPveCP/Sb6RIq34IVoVfoUHzoKHDqsdhuZKaDSQRre0rS0e3aLVrblrKOcs5NCvzmyeeIBdVDOFHTL9a5C4v2f1gsfVdY11E8GZtxf5BPIZhs2Zte58tEEbgvEefwBuLb13dgEAAA==" }, "Metadata": { "aws:cdk:path": "development-TranscribeService/CDKMetadata/Default" @@ -458,17 +499,17 @@ "Type": "String", "Description": "Artifact hash for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" }, - "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C": { + "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA": { "Type": "String", - "Description": "S3 bucket for asset \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" + "Description": "S3 bucket for asset \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" }, - "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C": { + "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF": { "Type": "String", - "Description": "S3 key for asset version \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" + "Description": "S3 key for asset version \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" }, - "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1": { + "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628": { "Type": "String", - "Description": "Artifact hash for asset \"27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee\"" + "Description": "Artifact hash for asset \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" } }, "Conditions": { diff --git a/cdk.out/manifest.json b/cdk.out/manifest.json index 1c9fa80..b52081b 100644 --- a/cdk.out/manifest.json +++ b/cdk.out/manifest.json @@ -306,7 +306,7 @@ "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -319,13 +319,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee.zip", - "id": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", + "path": "asset.1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1.zip", + "id": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", "packaging": "file", - "sourceHash": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", - "s3BucketParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C", - "s3KeyParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C", - "artifactHashParameter": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1" + "sourceHash": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", + "s3BucketParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA", + "s3KeyParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF", + "artifactHashParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628" }, "trace": [ "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", @@ -337,7 +337,7 @@ "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -356,7 +356,7 @@ "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:95:29)", "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -376,7 +376,7 @@ "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:47:36)", "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -393,7 +393,7 @@ "data": "ffmpeglayer406486B5", "trace": [ "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:64:26)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -417,7 +417,7 @@ "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -441,7 +441,7 @@ "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -465,7 +465,7 @@ "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:22:25)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -476,10 +476,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3Bucket": [ + "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C", + "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -490,7 +490,7 @@ "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -501,10 +501,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3VersionKey": [ + "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C", + "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -515,7 +515,7 @@ "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -526,10 +526,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/ArtifactHash": [ + "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeArtifactHash9DD98CF1", + "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -540,7 +540,7 @@ "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -559,7 +559,7 @@ "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -581,7 +581,7 @@ "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", "Import.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:442:31)", "Import.grantReadWrite (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:335:21)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:52:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:55:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -599,7 +599,7 @@ "trace": [ "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:34:32)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -621,7 +621,7 @@ "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -645,7 +645,7 @@ "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", @@ -666,7 +666,7 @@ "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:51:22)", + "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", diff --git a/cdk.out/tree.json b/cdk.out/tree.json index 0f06088..1835ea5 100644 --- a/cdk.out/tree.json +++ b/cdk.out/tree.json @@ -379,6 +379,14 @@ "version": "1.130.0" } }, + "DynamoTableVideos": { + "id": "DynamoTableVideos", + "path": "development-TranscribeService/DynamoTableVideos", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "1.107.0" + } + }, "ffmpeg-layer": { "id": "ffmpeg-layer", "path": "development-TranscribeService/ffmpeg-layer", @@ -510,13 +518,13 @@ "version": "1.107.0" } }, - "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee": { - "id": "27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", - "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee", + "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1": { + "id": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", + "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3Bucket", + "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -524,7 +532,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/S3VersionKey", + "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -532,7 +540,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63ee/ArtifactHash", + "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -682,6 +690,47 @@ ] } ] + }, + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/development-videos" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] } ], "Version": "2012-10-17" @@ -745,7 +794,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3BucketF849967C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA" }, "s3Key": { "Fn::Join": [ @@ -758,7 +807,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" } ] } @@ -771,7 +820,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters27450ee8a60fbfa88a761d240611a90e9ceea49cfaa31e723ab9c5972c8c63eeS3VersionKey87C6ED6C" + "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" } ] } diff --git a/infrastructure/services/transcribe/index.js b/infrastructure/services/transcribe/index.js index 1f0a60a..e7c5d49 100644 --- a/infrastructure/services/transcribe/index.js +++ b/infrastructure/services/transcribe/index.js @@ -6,6 +6,7 @@ const cdk = require('@aws-cdk/core'); const s3 = require('@aws-cdk/aws-s3'); const s3n = require('@aws-cdk/aws-s3-notifications'); const sqs = require('@aws-cdk/aws-sqs'); +const dynamodb = require('@aws-cdk/aws-dynamodb'); const { S3EventSource } = require('@aws-cdk/aws-lambda-event-sources'); @@ -19,6 +20,8 @@ class TranscribeService extends cdk.Stack { const videoInputBucket = s3.Bucket.fromBucketName(this, 'VideoInputBucket', `development-storage-videoinputbucket940f4f43-1du1ixen5jp8u`); const extractedAudioBucket = s3.Bucket.fromBucketName(this, 'AudioExtractedBucket', `development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz`); + const videoTable = dynamodb.Table.fromTableName(this, 'DynamoTableVideos', 'development-videos' ) + const ffmpegLayer = new lambda.LayerVersion(this, 'ffmpeg-layer', { compatibleRuntimes: [ lambda.Runtime.NODEJS_10_X, @@ -52,6 +55,8 @@ class TranscribeService extends cdk.Stack { videoInputBucket.grantReadWrite(extractAudioLambda); extractedAudioBucket.grantReadWrite(extractAudioLambda); + + videoTable.grantReadWriteData(extractAudioLambda); diff --git a/package.json b/package.json index 3f1411b..d3e54d2 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "@aws-cdk/aws-lambda-event-sources": "^1.110.1", "@aws-cdk/aws-rds": "^1.51.0", "@aws-cdk/aws-s3": "^1.51.0", - "@aws-cdk/aws-s3-notifications": "^1.51.0", "@aws-cdk/aws-s3-assets": "^1.97.0", + "@aws-cdk/aws-s3-notifications": "^1.51.0", "@aws-cdk/aws-secretsmanager": "^1.51.0", "@aws-cdk/aws-sns": "^1.51.0", "@aws-cdk/aws-sns-subscriptions": "^1.51.0", @@ -83,6 +83,7 @@ "babel-plugin-module-resolver": "^3.2.0", "babel-plugin-source-map-support": "^2.0.1", "babel-plugin-styled-components": "^1.12.0", + "dynamodb-toolbox": "^0.3.4", "eslint": "^7.22.0", "eslint-config-airbnb": "^18.0.1", "eslint-config-airbnb-base": "^14.0.0", diff --git a/src/services/transcribe/extract-audio/index.ts b/src/services/transcribe/extract-audio/index.ts index c747f77..de86977 100644 --- a/src/services/transcribe/extract-audio/index.ts +++ b/src/services/transcribe/extract-audio/index.ts @@ -14,9 +14,11 @@ import customConfig from './config'; import { generateUUID } from "../../../utils/uuid"; import childProcess from 'child_process'; import cleanOutTmp from "../../../utils/clean-out-tmp"; +import { createDynamoDbClient } from "../../../utils/aws/dynamodb"; const createClients = (config: any) => ({ s3: createS3Client(), + db: createDynamoDbClient() }); process.env.PATH = @@ -28,11 +30,22 @@ const getExtension = (filename: string) => { return ext[ext.length - 1]; }; +const generateDefaultVideoItem = ( + videoBucketKey, +) => ({ + id: '' + generateUUID(), + userId: ''+ generateUUID(), + state: 'pending', + videoBucketKey, + extractedAudioKey: null, + transcriptionState: 'pending', + transcriptionKey: null +}) + async function extractAudio(event, { logger }) { const config = getConfig(customConfig); const clients = createClients(config); - try { @@ -41,7 +54,6 @@ async function extractAudio(event, { logger }) { const eventRecord = event.Records && event.Records[0]; - const id = generateUUID(); const inputBucket = eventRecord.s3.bucket.name; const key = eventRecord.s3.object.key; @@ -50,6 +62,16 @@ async function extractAudio(event, { logger }) { const blob = await clients.s3.get({ bucket: inputBucket, key}); const body = blob?.Body; + const item = generateDefaultVideoItem({videoBucketKey: key}); + + try{ + await clients.db.put(item); + + }catch(e) { + logger.info(e); + + } + const videoKeyName = `/tmp/${key}`; const audioKeyName = `/tmp/temp.mp3`; @@ -79,7 +101,7 @@ async function extractAudio(event, { logger }) { logger.info(`audioName:${audioKeyName} Reading audio file...`); - await clients.s3.put({ file: audioName, bucket: audioBucket, key: `${uuidv4()}-temp.mp3`}); + await clients.s3.put({ file: audioName, bucket: audioBucket, key: `${generateUUID()}-temp.mp3`}); logger.info(`audioName:${audioKeyName} Writing audio file to s3 ...`); cleanOutTmp(logger); diff --git a/src/utils/aws/dynamodb.ts b/src/utils/aws/dynamodb.ts new file mode 100644 index 0000000..d7a5e39 --- /dev/null +++ b/src/utils/aws/dynamodb.ts @@ -0,0 +1,50 @@ +import { DynamoDB } from 'aws-sdk'; +import { Entity, Table } from 'dynamodb-toolbox'; + + +export const createDynamoDbClient = () => { + + const client = new DynamoDB.DocumentClient({ + apiVersion: '2012-08-10', + region: 'us-east-1' + }); + + const table = new Table({ + DocumentClient: client, + // FIXME: Use the value in config.ts + name: 'development-videos', + partitionKey: 'id', + sortKey: 'userId' + }); + +// ID (generate an ID using uuid package) +// state (starts with pending) +// videoBucketKey (location of uploaded video on s3) +// extractedAudioKey (location of extracted audio key, will be null initially) +// transcriptionState (starts with pending) +// transcriptionKey (location of transcription SRT file from Assembly.AI, will be null initially) + const entity = new Entity({ + attributes: { + id: { partitionKey: true, type: 'string' }, + userId: { sortKey: true, type: 'string'}, + state: { type: 'string' }, + videoBucketKey: { type: 'string' }, + extractedAudioKey: { type: 'string' }, + transcriptionState: { type: 'string' }, + transcriptionKey: { type: 'string' } + }, + name: 'DynamoTableVideos', + table + }); + + const put = async (item) => { + await entity.put(item); + } + + return { + client, + put + + }; + +} diff --git a/yarn.lock b/yarn.lock index 1345c2c..2cfd3ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5733,6 +5733,11 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +dynamodb-toolbox@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/dynamodb-toolbox/-/dynamodb-toolbox-0.3.4.tgz#5cd74536d88ae2901375dce0041fac0424c91e95" + integrity sha512-5J4f4EMkcO8jJw/TDAVG4Vy0tlCaDOMYILutPUe1fvTFSuw0QKIYPifY17bAj1QKkx2tB96dLEXNntmWoWvDng== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" From 5e4fc49397c857ac90576ccf102344cdf62c4f67 Mon Sep 17 00:00:00 2001 From: rex Date: Sun, 7 Nov 2021 00:16:49 -0400 Subject: [PATCH 4/5] feat: add update methods and refactor tmp cleaning method --- ...evelopment-TranscribeService.template.json | 20 ++++++------- cdk.out/manifest.json | 24 ++++++++-------- cdk.out/tree.json | 18 ++++++------ .../transcribe/extract-audio/index.ts | 28 ++++++++----------- src/utils/aws/dynamodb.ts | 6 +++- 5 files changed, 47 insertions(+), 49 deletions(-) diff --git a/cdk.out/development-TranscribeService.template.json b/cdk.out/development-TranscribeService.template.json index dfeb762..50135dc 100644 --- a/cdk.out/development-TranscribeService.template.json +++ b/cdk.out/development-TranscribeService.template.json @@ -292,7 +292,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966" }, "S3Key": { "Fn::Join": [ @@ -305,7 +305,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" } ] } @@ -318,7 +318,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" } ] } @@ -383,7 +383,7 @@ ], "Metadata": { "aws:cdk:path": "development-TranscribeService/ExtractAudioLambda/Resource", - "aws:asset:path": "asset.1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1.zip", + "aws:asset:path": "asset.addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba.zip", "aws:asset:property": "Code" } }, @@ -499,17 +499,17 @@ "Type": "String", "Description": "Artifact hash for asset \"c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c\"" }, - "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA": { + "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966": { "Type": "String", - "Description": "S3 bucket for asset \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" + "Description": "S3 bucket for asset \"addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba\"" }, - "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF": { + "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E": { "Type": "String", - "Description": "S3 key for asset version \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" + "Description": "S3 key for asset version \"addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba\"" }, - "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628": { + "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baArtifactHash5BDE521C": { "Type": "String", - "Description": "Artifact hash for asset \"1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1\"" + "Description": "Artifact hash for asset \"addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba\"" } }, "Conditions": { diff --git a/cdk.out/manifest.json b/cdk.out/manifest.json index b52081b..52e0f5a 100644 --- a/cdk.out/manifest.json +++ b/cdk.out/manifest.json @@ -319,13 +319,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1.zip", - "id": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", + "path": "asset.addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba.zip", + "id": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", "packaging": "file", - "sourceHash": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", - "s3BucketParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA", - "s3KeyParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF", - "artifactHashParameter": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628" + "sourceHash": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", + "s3BucketParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966", + "s3KeyParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E", + "artifactHashParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baArtifactHash5BDE521C" }, "trace": [ "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", @@ -476,10 +476,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3Bucket": [ + "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA", + "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -501,10 +501,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3VersionKey": [ + "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF", + "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", @@ -526,10 +526,10 @@ ] } ], - "/development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/ArtifactHash": [ + "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1ArtifactHashF524F628", + "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baArtifactHash5BDE521C", "trace": [ "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", diff --git a/cdk.out/tree.json b/cdk.out/tree.json index 1835ea5..8d0425f 100644 --- a/cdk.out/tree.json +++ b/cdk.out/tree.json @@ -518,13 +518,13 @@ "version": "1.107.0" } }, - "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1": { - "id": "1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", - "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1", + "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba": { + "id": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", + "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3Bucket", + "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -532,7 +532,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/S3VersionKey", + "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -540,7 +540,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1/ArtifactHash", + "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "1.107.0" @@ -794,7 +794,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3BucketA7286ACA" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966" }, "s3Key": { "Fn::Join": [ @@ -807,7 +807,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" } ] } @@ -820,7 +820,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1352f25b0e9bbfbc3f0795c379bced8a6de5bb7ba5c6fa8fe26d30f337a985d1S3VersionKeyD55D78AF" + "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" } ] } diff --git a/src/services/transcribe/extract-audio/index.ts b/src/services/transcribe/extract-audio/index.ts index de86977..214ab5e 100644 --- a/src/services/transcribe/extract-audio/index.ts +++ b/src/services/transcribe/extract-audio/index.ts @@ -30,9 +30,9 @@ const getExtension = (filename: string) => { return ext[ext.length - 1]; }; -const generateDefaultVideoItem = ( +const generateDefaultVideoItem = ({ videoBucketKey, -) => ({ +}) => ({ id: '' + generateUUID(), userId: ''+ generateUUID(), state: 'pending', @@ -64,14 +64,8 @@ async function extractAudio(event, { logger }) { const item = generateDefaultVideoItem({videoBucketKey: key}); - try{ await clients.db.put(item); - }catch(e) { - logger.info(e); - - } - const videoKeyName = `/tmp/${key}`; const audioKeyName = `/tmp/temp.mp3`; @@ -95,22 +89,22 @@ async function extractAudio(event, { logger }) { const audioName = fs.readFileSync(audioKeyName); - fs.readdirSync('/tmp/').forEach(file => { - logger.info(`opt: ${file}`); - }); - logger.info(`audioName:${audioKeyName} Reading audio file...`); - await clients.s3.put({ file: audioName, bucket: audioBucket, key: `${generateUUID()}-temp.mp3`}); + const audioBucketKeyName = `${generateUUID()}-temp.mp3` + + await clients.s3.put({ file: audioName, bucket: audioBucket, key: audioBucketKeyName }); logger.info(`audioName:${audioKeyName} Writing audio file to s3 ...`); - - cleanOutTmp(logger); + + item.extractedAudioKey = audioBucketKeyName as any; + + await clients.db.update(item); } catch (error) { logger.error(error); - cleanOutTmp(logger); - throw error; + throw error; } + cleanOutTmp(logger); } const options = { diff --git a/src/utils/aws/dynamodb.ts b/src/utils/aws/dynamodb.ts index d7a5e39..e6071e7 100644 --- a/src/utils/aws/dynamodb.ts +++ b/src/utils/aws/dynamodb.ts @@ -40,10 +40,14 @@ export const createDynamoDbClient = () => { const put = async (item) => { await entity.put(item); } + const update = async (item) => { + await entity.update(item); + } return { client, - put + put, + update }; From 5a7a80ad7df00fac795169a333965d179d3280c5 Mon Sep 17 00:00:00 2001 From: rex Date: Fri, 19 Nov 2021 15:34:42 -0500 Subject: [PATCH 5/5] feat: add in storage stack --- cdk.out/manifest.json | 656 +-------------------- cdk.out/tree.json | 908 +----------------------------- infrastructure/central/central.js | 72 +++ infrastructure/central/storage.js | 30 +- infrastructure/infrastructure.js | 57 +- 5 files changed, 172 insertions(+), 1551 deletions(-) create mode 100644 infrastructure/central/central.js diff --git a/cdk.out/manifest.json b/cdk.out/manifest.json index 52e0f5a..6fd9708 100644 --- a/cdk.out/manifest.json +++ b/cdk.out/manifest.json @@ -7,114 +7,23 @@ "file": "tree.json" } }, - "development-Dynamo": { + "captionese-central-stack-development": { "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", + "environment": "aws://AKIARBWIJ3UYTP2TZNAQ/us-east-1", "properties": { - "templateFile": "development-Dynamo.template.json", + "templateFile": "captionese-central-stack-development.template.json", "validateOnSynth": false }, "metadata": { - "/development-Dynamo/DynamoTableVideos": [ - { - "type": "aws:cdk:hasPhysicalName", - "data": { - "Ref": "DynamoTableVideos2148946B" - }, - "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "new Table (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-dynamodb/lib/table.js:482:23)", - "new Dynamo (/Users/rexpeterson/work/captionease-backend/infrastructure/central/dynamodb.js:8:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:30:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-Dynamo/DynamoTableVideos/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "DynamoTableVideos2148946B", - "trace": [ - "new Table (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-dynamodb/lib/table.js:456:22)", - "new Dynamo (/Users/rexpeterson/work/captionease-backend/infrastructure/central/dynamodb.js:8:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:30:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-Dynamo/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-Dynamo/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ] - }, - "displayName": "development-Dynamo" - }, - "development-Storage": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "development-Storage.template.json", - "validateOnSynth": false - }, - "metadata": { - "/development-Storage/VideoInputBucket/Resource": [ + "/captionese-central-stack-development/VideoInputBucket/Resource": [ { "type": "aws:cdk:logicalId", "data": "VideoInputBucket940F4F43", "trace": [ "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", - "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:8:5)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", + "StorageStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:7:28)", + "new CentralStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/central.js:31:13)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -124,14 +33,15 @@ ] } ], - "/development-Storage/AudioExtractedBucket/Resource": [ + "/captionese-central-stack-development/AudioExtractedBucket/Resource": [ { "type": "aws:cdk:logicalId", "data": "AudioExtractedBucketE38BCDCF", "trace": [ "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", - "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:12:5)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", + "StorageStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:11:32)", + "new CentralStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/central.js:31:13)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -141,14 +51,15 @@ ] } ], - "/development-Storage/VideoTranscriptionsBucket/Resource": [ + "/captionese-central-stack-development/VideoTranscriptionsBucket/Resource": [ { "type": "aws:cdk:logicalId", "data": "VideoTranscriptionsBucket52F9EC40", "trace": [ "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", - "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:16:5)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", + "StorageStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:15:36)", + "new CentralStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/central.js:31:13)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -158,495 +69,15 @@ ] } ], - "/development-Storage/VideoEncodedBucket/Resource": [ + "/captionese-central-stack-development/VideoEncodedBucket/Resource": [ { "type": "aws:cdk:logicalId", "data": "VideoEncodedBucket1B0DA95A", "trace": [ "new Bucket (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:586:26)", - "new Storage (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:20:5)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:35:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-Storage/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-Storage/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ] - }, - "displayName": "development-Storage" - }, - "development-EncodeService": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "development-EncodeService.template.json", - "validateOnSynth": false - }, - "metadata": { - "/development-EncodeService/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:22:30)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-EncodeService/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ] - }, - "displayName": "development-EncodeService" - }, - "development-TranscribeService": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "development-TranscribeService.template.json", - "validateOnSynth": false - }, - "metadata": { - "/development-TranscribeService": [ - { - "type": "aws:cdk:asset", - "data": { - "path": "asset.c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c.zip", - "id": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "packaging": "file", - "sourceHash": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "s3BucketParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", - "s3KeyParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", - "artifactHashParameter": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E" - }, - "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - }, - { - "type": "aws:cdk:asset", - "data": { - "path": "asset.addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba.zip", - "id": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", - "packaging": "file", - "sourceHash": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", - "s3BucketParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966", - "s3KeyParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E", - "artifactHashParameter": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baArtifactHash5BDE521C" - }, - "trace": [ - "ConstructNode.addMetadata (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/construct-compat.js:405:62)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:175:29)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/VideoInputBucket/Notifications/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoInputBucketNotifications76FF7081", - "trace": [ - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:95:29)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", - "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A": [ - { - "type": "aws:cdk:logicalId", - "data": "VideoInputBucketAllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A0588AE5F", - "trace": [ - "Function.addPermission (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function-base.js:42:9)", - "LambdaDestination.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-notifications/lib/lambda.js:40:21)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:47:36)", - "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/ffmpeg-layer/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ffmpeglayer406486B5", - "trace": [ - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:64:26)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cArtifactHash1ED8151E", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new LayerVersion (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/layers.js:57:33)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:25:25)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3Bucket": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:12:36)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3VersionKey": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:16:35)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/ArtifactHash": [ - { - "type": "aws:cdk:logicalId", - "data": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baArtifactHash5BDE521C", - "trace": [ - "new FileAssetParameters (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/asset-parameters.js:20:38)", - "LegacyStackSynthesizer.doAddFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:162:22)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:83:25)", - "TranscribeService.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack.js:410:33)", - "LegacyStackSynthesizer.addFileAsset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stack-synthesizers/legacy.js:87:31)", - "new Asset (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3-assets/lib/asset.js:40:44)", - "AssetCode.bind (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/code.js:258:26)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:97:33)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/ExtractAudioLambda/ServiceRole/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ExtractAudioLambdaServiceRole0AE87B8E", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:79:35)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-iam/lib/role.js:205:34)", - "Function.addToPrincipal (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/grant.js:90:65)", - "Function.addToPrincipalOrResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/grant.js:45:30)", - "Import.grant (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:442:31)", - "Import.grantReadWrite (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:335:21)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:55:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/ExtractAudioLambda/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ExtractAudioLambda12696EC4", - "trace": [ - "new Function (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-lambda/lib/function.js:135:26)", - "createLambdaFunction (/Users/rexpeterson/work/captionease-backend/infrastructure/utils/create-lambda-function.js:15:3)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:37:32)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC", - "trace": [ - "new Role (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:72:22)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:31:21)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", - "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "trace": [ - "new Policy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/policy.js:56:26)", - "Role.addToPrincipalPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:209:34)", - "Role.addToPolicy (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/node_modules/@aws-cdk/aws-iam/lib/role.js:221:21)", - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:37:19)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", - "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", + "StorageStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/storage.js:19:30)", + "new CentralStack (/Users/rexpeterson/work/captionease-backend/infrastructure/central/central.js:31:13)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:1)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -656,28 +87,7 @@ ] } ], - "/development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691", - "trace": [ - "new NotificationsResourceHandler (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:53:26)", - "Function.singleton (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js:79:22)", - "BucketNotifications.createResourceOnce (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:87:91)", - "BucketNotifications.addNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource.js:44:31)", - "Import.addEventNotification (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/aws-s3/lib/bucket.js:390:28)", - "new TranscribeService (/Users/rexpeterson/work/captionease-backend/infrastructure/services/transcribe/index.js:54:22)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:49:1)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/CDKMetadata/Default": [ + "/captionese-central-stack-development/CDKMetadata/Default": [ { "type": "aws:cdk:logicalId", "data": "CDKMetadata", @@ -689,29 +99,7 @@ "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", - "Module._compile (internal/modules/cjs/loader.js:1063:30)", - "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", - "Module.load (internal/modules/cjs/loader.js:928:32)", - "Function.Module._load (internal/modules/cjs/loader.js:769:14)", - "Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)", - "internal/main/run_main_module.js:17:47" - ] - } - ], - "/development-TranscribeService/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable", - "trace": [ - "new MetadataResource (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/metadata-resource.js:30:35)", - "/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:128:9", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:185:9)", - "visit (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:182:9)", - "injectMetadataResources (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:117:5)", - "Object.synthesize (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/private/synthesis.js:17:5)", - "App.synth (/Users/rexpeterson/work/captionease-backend/node_modules/@aws-cdk/core/lib/stage.js:100:41)", - "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:57:5)", + "Object. (/Users/rexpeterson/work/captionease-backend/infrastructure/infrastructure.js:64:5)", "Module._compile (internal/modules/cjs/loader.js:1063:30)", "Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)", "Module.load (internal/modules/cjs/loader.js:928:32)", @@ -722,7 +110,7 @@ } ] }, - "displayName": "development-TranscribeService" + "displayName": "captionese-central-stack-development" } } } \ No newline at end of file diff --git a/cdk.out/tree.json b/cdk.out/tree.json index 8d0425f..d72c05b 100644 --- a/cdk.out/tree.json +++ b/cdk.out/tree.json @@ -12,106 +12,17 @@ "version": "1.107.0" } }, - "development-Dynamo": { - "id": "development-Dynamo", - "path": "development-Dynamo", - "children": { - "DynamoTableVideos": { - "id": "DynamoTableVideos", - "path": "development-Dynamo/DynamoTableVideos", - "children": { - "Resource": { - "id": "Resource", - "path": "development-Dynamo/DynamoTableVideos/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::DynamoDB::Table", - "aws:cdk:cloudformation:props": { - "keySchema": [ - { - "attributeName": "id", - "keyType": "HASH" - }, - { - "attributeName": "userId", - "keyType": "RANGE" - } - ], - "attributeDefinitions": [ - { - "attributeName": "id", - "attributeType": "S" - }, - { - "attributeName": "userId", - "attributeType": "S" - } - ], - "billingMode": "PAY_PER_REQUEST", - "tableName": "development-videos" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-dynamodb.CfnTable", - "version": "1.107.0" - } - }, - "ScalingRole": { - "id": "ScalingRole", - "path": "development-Dynamo/DynamoTableVideos/ScalingRole", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-dynamodb.Table", - "version": "1.107.0" - } - }, - "CDKMetadata": { - "id": "CDKMetadata", - "path": "development-Dynamo/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "development-Dynamo/CDKMetadata/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - }, - "Condition": { - "id": "Condition", - "path": "development-Dynamo/CDKMetadata/Condition", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnCondition", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "1.107.0" - } - }, - "development-Storage": { - "id": "development-Storage", - "path": "development-Storage", + "captionese-central-stack-development": { + "id": "captionese-central-stack-development", + "path": "captionese-central-stack-development", "children": { "VideoInputBucket": { "id": "VideoInputBucket", - "path": "development-Storage/VideoInputBucket", + "path": "captionese-central-stack-development/VideoInputBucket", "children": { "Notifications": { "id": "Notifications", - "path": "development-Storage/VideoInputBucket/Notifications", + "path": "captionese-central-stack-development/VideoInputBucket/Notifications", "constructInfo": { "fqn": "@aws-cdk/core.Construct", "version": "1.130.0" @@ -119,7 +30,7 @@ }, "Resource": { "id": "Resource", - "path": "development-Storage/VideoInputBucket/Resource", + "path": "captionese-central-stack-development/VideoInputBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": {} @@ -137,11 +48,11 @@ }, "AudioExtractedBucket": { "id": "AudioExtractedBucket", - "path": "development-Storage/AudioExtractedBucket", + "path": "captionese-central-stack-development/AudioExtractedBucket", "children": { "Notifications": { "id": "Notifications", - "path": "development-Storage/AudioExtractedBucket/Notifications", + "path": "captionese-central-stack-development/AudioExtractedBucket/Notifications", "constructInfo": { "fqn": "@aws-cdk/core.Construct", "version": "1.130.0" @@ -149,7 +60,7 @@ }, "Resource": { "id": "Resource", - "path": "development-Storage/AudioExtractedBucket/Resource", + "path": "captionese-central-stack-development/AudioExtractedBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": {} @@ -167,11 +78,11 @@ }, "VideoTranscriptionsBucket": { "id": "VideoTranscriptionsBucket", - "path": "development-Storage/VideoTranscriptionsBucket", + "path": "captionese-central-stack-development/VideoTranscriptionsBucket", "children": { "Notifications": { "id": "Notifications", - "path": "development-Storage/VideoTranscriptionsBucket/Notifications", + "path": "captionese-central-stack-development/VideoTranscriptionsBucket/Notifications", "constructInfo": { "fqn": "@aws-cdk/core.Construct", "version": "1.130.0" @@ -179,7 +90,7 @@ }, "Resource": { "id": "Resource", - "path": "development-Storage/VideoTranscriptionsBucket/Resource", + "path": "captionese-central-stack-development/VideoTranscriptionsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": {} @@ -197,11 +108,11 @@ }, "VideoEncodedBucket": { "id": "VideoEncodedBucket", - "path": "development-Storage/VideoEncodedBucket", + "path": "captionese-central-stack-development/VideoEncodedBucket", "children": { "Notifications": { "id": "Notifications", - "path": "development-Storage/VideoEncodedBucket/Notifications", + "path": "captionese-central-stack-development/VideoEncodedBucket/Notifications", "constructInfo": { "fqn": "@aws-cdk/core.Construct", "version": "1.130.0" @@ -209,7 +120,7 @@ }, "Resource": { "id": "Resource", - "path": "development-Storage/VideoEncodedBucket/Resource", + "path": "captionese-central-stack-development/VideoEncodedBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": {} @@ -227,800 +138,15 @@ }, "CDKMetadata": { "id": "CDKMetadata", - "path": "development-Storage/CDKMetadata", + "path": "captionese-central-stack-development/CDKMetadata", "children": { "Default": { "id": "Default", - "path": "development-Storage/CDKMetadata/Default", + "path": "captionese-central-stack-development/CDKMetadata/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "1.107.0" } - }, - "Condition": { - "id": "Condition", - "path": "development-Storage/CDKMetadata/Condition", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnCondition", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "1.107.0" - } - }, - "development-EncodeService": { - "id": "development-EncodeService", - "path": "development-EncodeService", - "children": { - "CDKMetadata": { - "id": "CDKMetadata", - "path": "development-EncodeService/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "development-EncodeService/CDKMetadata/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - }, - "Condition": { - "id": "Condition", - "path": "development-EncodeService/CDKMetadata/Condition", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnCondition", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "1.107.0" - } - }, - "development-TranscribeService": { - "id": "development-TranscribeService", - "path": "development-TranscribeService", - "children": { - "VideoInputBucket": { - "id": "VideoInputBucket", - "path": "development-TranscribeService/VideoInputBucket", - "children": { - "Notifications": { - "id": "Notifications", - "path": "development-TranscribeService/VideoInputBucket/Notifications", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/VideoInputBucket/Notifications/Resource", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.130.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.130.0" - } - }, - "AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A": { - "id": "AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A", - "path": "development-TranscribeService/VideoInputBucket/AllowBucketNotificationsTodevelopmentTranscribeServiceExtractAudioLambda34FAF03A", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", - "aws:cdk:cloudformation:props": { - "action": "lambda:InvokeFunction", - "functionName": { - "Fn::GetAtt": [ - "ExtractAudioLambda12696EC4", - "Arn" - ] - }, - "principal": "s3.amazonaws.com", - "sourceAccount": { - "Ref": "AWS::AccountId" - }, - "sourceArn": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" - ] - ] - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnPermission", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "1.130.0" - } - }, - "AudioExtractedBucket": { - "id": "AudioExtractedBucket", - "path": "development-TranscribeService/AudioExtractedBucket", - "children": { - "Notifications": { - "id": "Notifications", - "path": "development-TranscribeService/AudioExtractedBucket/Notifications", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.130.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "1.130.0" - } - }, - "DynamoTableVideos": { - "id": "DynamoTableVideos", - "path": "development-TranscribeService/DynamoTableVideos", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - }, - "ffmpeg-layer": { - "id": "ffmpeg-layer", - "path": "development-TranscribeService/ffmpeg-layer", - "children": { - "Code": { - "id": "Code", - "path": "development-TranscribeService/ffmpeg-layer/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "development-TranscribeService/ffmpeg-layer/Code/Stage", - "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "1.107.0" - } - }, - "AssetBucket": { - "id": "AssetBucket", - "path": "development-TranscribeService/ffmpeg-layer/Code/AssetBucket", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/ffmpeg-layer/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::LayerVersion", - "aws:cdk:cloudformation:props": { - "content": { - "s3Bucket": { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3BucketD54C6570" - }, - "s3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersc8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7cS3VersionKey2462D29B" - } - ] - } - ] - } - ] - ] - } - }, - "compatibleRuntimes": [ - "nodejs10.x", - "nodejs12.x", - "nodejs14.x" - ], - "description": "ffmpeg use for lambda" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnLayerVersion", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.LayerVersion", - "version": "1.107.0" - } - }, - "AssetParameters": { - "id": "AssetParameters", - "path": "development-TranscribeService/AssetParameters", - "children": { - "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c": { - "id": "c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c", - "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3Bucket", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/S3VersionKey", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/c8ef7b05d969af8a7228ffccde7487627da82ed2f2f98b7f15b90084d93b2b7c/ArtifactHash", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba": { - "id": "addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", - "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba", - "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3Bucket", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/S3VersionKey", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "development-TranscribeService/AssetParameters/addd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4ba/ArtifactHash", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.107.0" - } - }, - "ExtractAudioLambda": { - "id": "ExtractAudioLambda", - "path": "development-TranscribeService/ExtractAudioLambda", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.107.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/ExtractAudioLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u/*" - ] - ] - } - ] - }, - { - "Action": [ - "s3:GetObject*", - "s3:GetBucket*", - "s3:List*", - "s3:DeleteObject*", - "s3:PutObject*", - "s3:Abort*" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz/*" - ] - ] - } - ] - }, - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:Query", - "dynamodb:GetItem", - "dynamodb:Scan", - "dynamodb:ConditionCheckItem", - "dynamodb:BatchWriteItem", - "dynamodb:PutItem", - "dynamodb:UpdateItem", - "dynamodb:DeleteItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/development-videos" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "ExtractAudioLambdaServiceRoleDefaultPolicyE1C9E0C3", - "roles": [ - { - "Ref": "ExtractAudioLambdaServiceRole0AE87B8E" - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.107.0" - } - }, - "Code": { - "id": "Code", - "path": "development-TranscribeService/ExtractAudioLambda/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "development-TranscribeService/ExtractAudioLambda/Code/Stage", - "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "1.107.0" - } - }, - "AssetBucket": { - "id": "AssetBucket", - "path": "development-TranscribeService/ExtractAudioLambda/Code/AssetBucket", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "1.107.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/ExtractAudioLambda/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Lambda::Function", - "aws:cdk:cloudformation:props": { - "code": { - "s3Bucket": { - "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3BucketD8317966" - }, - "s3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersaddd488ffb48ef4959a5357531209cfc18917f5c778d68be307c814df67fe4baS3VersionKey5C2B099E" - } - ] - } - ] - } - ] - ] - } - }, - "role": { - "Fn::GetAtt": [ - "ExtractAudioLambdaServiceRole0AE87B8E", - "Arn" - ] - }, - "environment": { - "variables": { - "STAGE": "development", - "NODE_ENV": "development", - "SUPABASE_API_URL": "https://jtlvnnrxubgfwmzltxon.supabase.co", - "SUPABASE_API_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzNDQwOTk2NSwiZXhwIjoxOTQ5OTg1OTY1fQ.-i-Jl1gw1MM2KAz7NZwLrADMpqtBmY38t4_oHR6KGeM", - "VIDEO_INPUT_BUCKET": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-videoinputbucket940f4f43-1du1ixen5jp8u" - ] - ] - }, - "EXTRACTED_VIDEO_AUDIO_BUCKET": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":s3:::development-storage-audioextractedbuckete38bcdcf-10n4xngbp78mz" - ] - ] - } - } - }, - "functionName": "extractAudioLambda", - "handler": "extract-audio.handler", - "layers": [ - { - "Ref": "ffmpeglayer406486B5" - } - ], - "memorySize": 521, - "runtime": "nodejs12.x", - "timeout": 60 - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.CfnFunction", - "version": "1.107.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-lambda.Function", - "version": "1.107.0" - } - }, - "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { - "id": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834", - "children": { - "Role": { - "id": "Role", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", - "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "managedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "1.130.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "s3:PutBucketNotification", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketNotification", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleDefaultPolicy2CF63D36", - "roles": [ - { - "Ref": "BucketNotificationsHandler050a0587b7544547bf325f094a3db834RoleB6FB88EC" - } - ] - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "1.130.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", - "version": "1.130.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "1.130.0" - } - }, - "Resource": { - "id": "Resource", - "path": "development-TranscribeService/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.130.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "1.130.0" - } - }, - "CDKMetadata": { - "id": "CDKMetadata", - "path": "development-TranscribeService/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "development-TranscribeService/CDKMetadata/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "1.107.0" - } - }, - "Condition": { - "id": "Condition", - "path": "development-TranscribeService/CDKMetadata/Condition", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnCondition", - "version": "1.107.0" - } } }, "constructInfo": { diff --git a/infrastructure/central/central.js b/infrastructure/central/central.js new file mode 100644 index 0000000..3563827 --- /dev/null +++ b/infrastructure/central/central.js @@ -0,0 +1,72 @@ +const { StorageStack } = require('./storage'); + +const { Dynamo } = require("./dynamodb"); + +const { EncodeService } = require("../services/encode"); +const { TranscribeService } = require("../services/transcribe"); +const { Storage } = require('./storage'); + +const cdk = require("@aws-cdk/core"); + +class CentralStack extends cdk.Stack { + + constructor(scope, id, props) { + super(scope, id, props); + + const { + env, + app, + stage + } = props; + + /** + * + * Storage stack + */ + const { + videoInputBucket, + audioExtractedBucket, + videoTranscriptionBucket, + videoEncodedBucket + } = StorageStack({ scope: this, stage}); + + // -- create ssm param with streamableWaveformBucket.bucketName as STREAMABLE_AUDIO_BUCKET_NAME, + // -- create ssm param with streamableWaveformBucket.bucketArn as STREAMABLE_AUDIO_BUCKET_ARN, + + // Retrieve SSM param for lambda environment variables + + // const streamableAudioBucketName = StringParameter.fromStringParameterAttributes(scope, `param-${ssmKeys.STREAMABLE_AUDIO_BUCKET_NAME}-${envName}`, { + // parameterName: `/${envName}${STREAMABLE_AUDIO_BUCKET_NAME}`, + // simpleName: false, + // }); + + // Central + new Dynamo(app, `${stage}-Dynamo`, { + serviceName: "dynamo", + env, + stage, + }); + // new Storage(app, `${stage}-Storage`, { + // serviceName: "storage", + // env, + // stage + // }); + + // Services + new EncodeService(app, `${stage}-EncodeService`, { + serviceName: "encode", + env, + stage, + dependencies: {}, + }); + + new TranscribeService(app, `${stage}-TranscribeService`, { + serviceName: "transcribe", + env, + stage, + dependencies: {}, + }); + } +} + +module.exports = { CentralStack }; \ No newline at end of file diff --git a/infrastructure/central/storage.js b/infrastructure/central/storage.js index 6e3d592..6a1677a 100644 --- a/infrastructure/central/storage.js +++ b/infrastructure/central/storage.js @@ -1,6 +1,33 @@ const cdk = require('@aws-cdk/core'); const s3 = require('@aws-cdk/aws-s3'); +const StorageStack = (props) => { + const { stage, scope } = props; + + const videoInputBucket = new s3.Bucket(scope, 'VideoInputBucket', { + name: `video-input-bucket-${stage}` + }); + + const audioExtractedBucket = new s3.Bucket(scope, 'AudioExtractedBucket', { + name: `audio-extracted-bucket-${stage}` + }); + + const videoTranscriptionBucket = new s3.Bucket(scope, 'VideoTranscriptionsBucket', { + name: `video-transcriptions-bucket-${stage}` + }); + + const videoEncodedBucket = new s3.Bucket(scope, 'VideoEncodedBucket', { + name: `video-encoded-bucket-${stage}` + }); + + return { + videoInputBucket, + audioExtractedBucket, + videoTranscriptionBucket, + videoEncodedBucket + } +} + class Storage extends cdk.Stack { constructor(app, id, { stage }) { super(app, id); @@ -23,4 +50,5 @@ class Storage extends cdk.Stack { } } -module.exports = { Storage }; \ No newline at end of file + +module.exports = { Storage, StorageStack }; \ No newline at end of file diff --git a/infrastructure/infrastructure.js b/infrastructure/infrastructure.js index b81a249..049dd71 100644 --- a/infrastructure/infrastructure.js +++ b/infrastructure/infrastructure.js @@ -11,6 +11,7 @@ const { Dynamo } = require("./central/dynamodb"); const { EncodeService } = require("./services/encode"); const { TranscribeService } = require("./services/transcribe"); const { Storage } = require('./central/storage'); +const { CentralStack } = require('./central/central'); console.log(process.env.AWS_ACCESS_KEY_ID) @@ -27,31 +28,37 @@ const env = { }; // Central -new Dynamo(app, `${stage}-Dynamo`, { - serviceName: "dynamo", - env, - stage, -}); -new Storage(app, `${stage}-Storage`, { - serviceName: "storage", - env, - stage -}); - -// Services -new EncodeService(app, `${stage}-EncodeService`, { - serviceName: "encode", - env, - stage, - dependencies: {}, -}); - -new TranscribeService(app, `${stage}-TranscribeService`, { - serviceName: "transcribe", - env, - stage, - dependencies: {}, -}); +// new Dynamo(app, `${stage}-Dynamo`, { +// serviceName: "dynamo", +// env, +// stage, +// }); +// new Storage(app, `${stage}-Storage`, { +// serviceName: "storage", +// env, +// stage +// }); + +// // Services +// new EncodeService(app, `${stage}-EncodeService`, { +// serviceName: "encode", +// env, +// stage, +// dependencies: {}, +// }); + +// new TranscribeService(app, `${stage}-TranscribeService`, { +// serviceName: "transcribe", +// env, +// stage, +// dependencies: {}, +// }); + +new CentralStack(app, `captionese-central-stack-${stage}`, { + env, + stage, + dependencies: {} +}) app.synth();