# This is the SAM template that represents the architecture of your serverless application # https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template-basics.html # The AWSTemplateFormatVersion identifies the capabilities of the template # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/format-version-structure.html AWSTemplateFormatVersion: 2010-09-09 Description: >- Mission Insights Enrichment Engine (qs-1t54183nf) # Transform section specifies one or more macros that AWS CloudFormation uses to process your template # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html Transform: AWS::Serverless-2016-10-31 Metadata: cfn-lint: config: ignore_checks: - W9001 - E9007 # AWS::CloudFormation::Interface: # ParameterGroups: # - Label: # default: Application # Parameters: # - AppId # ParameterLabels: # AppId: # default: Application ID # Shared configuration for all resources, more in # https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: # The PermissionsBoundary allows users to safely develop with their function's permissions constrained # to their current application. All the functions and roles in this application have to include it and # it has to be manually updated when you add resources to your application. # More information in https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html # Uncomment this line once the full system is built and reinstate permission boundary # PermissionsBoundary: !Sub 'arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${AppId}-${AWS::Region}-PermissionsBoundary' Tags: Team: "AI and Data Insights" Project: "mi-media engine" #Parameters: # AppId: # Type: String # Description: Application ID # Resources declares the AWS resources that you want to include in the stack # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html Resources: # Each Lambda function is defined by properties: # https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction # This is a EventBridge config meb: Type: AWS::Events::EventBus Properties: Name: "me-bus" mebDiscovery: Type: AWS::EventSchemas::Discoverer Properties: SourceArn: !GetAtt meb.Arn Description: "Media Enrichment Schema Discovery" mebArchive: Type: AWS::Events::Archive Properties: ArchiveName: !Ref meb Description: "Media Enrichment Archive" RetentionDays: 1 SourceArn: !GetAtt meb.Arn # This is a Lambda function config associated with the source code: ingestion.py ingestion: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/ingestion.LambdaHandler Runtime: python3.8 MemorySize: 10240 Timeout: 30 Description: Enrichment Engine-Lambda function to ingest data into the enrichment engine Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBCrudPolicy: TableName: "*" - S3CrudPolicy: BucketName: "*" - EventBridgePutEventsPolicy: EventBusName: !Ref meb - SQSPollerPolicy: QueueName: !GetAtt ingestQueue.QueueName Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats AssetEnrichmentsTable: !Ref AssetEnrichments SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3txtract: !Ref S3txtract S3txtractA: !Ref S3txtractA S3txtPlain: !Ref S3txtPlain S3NlpTop: !Ref S3NlpTop S3NlpNer: !Ref S3NlpNer S3NlpLang: !Ref S3NlpLang S3NlpKp: !Ref S3NlpKp S3Assets: !Ref S3Assets S3Kendra: !Ref S3Kendra S3Translate: !Ref S3Translate S3Transcribe: !Ref S3Transcribe S3RkTxtDet: !Ref S3RkTxtDet S3RkSegDet: !Ref S3RkSegDet S3RkPplTrc: !Ref S3RkPplTrc S3RkLblDet: !Ref S3RkLblDet S3RkFacSrch: !Ref S3RkFacSrch S3RkFacDet: !Ref S3RkFacDet S3RkCeleb: !Ref S3RkCeleb S3RkMod: !Ref S3RkMod S3AzureDescrImg: !Ref S3AzureDescrImg ingestQueueUrl: !Ref ingestQueue Events: ingestEvent: Type: SQS Properties: BatchSize: 1 Enabled: True MaximumBatchingWindowInSeconds: 5 Queue: !GetAtt ingestQueue.Arn # This is a Lambda function config associated with the source code: textractStart.py textractStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/textractStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Textract Async Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3txtract: !Ref S3txtract S3txtractA: !Ref S3txtractA S3Assets: !Ref S3Assets TextractSNSarn: !GetAtt TextractSNSRl.Arn TextractSNSTopicArn: !Ref AmazonTextractSNS TextractASNSTopicArn: !Ref AmazonTextractASNS S3txtractarn: !GetAtt S3txtract.Arn S3txtractAarn: !GetAtt S3txtractA.Arn Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBWritePolicy: TableName: !Ref AssetProcessing - DynamoDBWritePolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - TextractDetectAnalyzePolicy: {} - S3CrudPolicy: BucketName: !Ref S3txtractA - S3CrudPolicy: BucketName: !Ref S3txtract - S3CrudPolicy: BucketName: !Ref S3Assets Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - pdf # This is a Lambda function config associated with the source code: textractComplete.py textractComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/textractComplete.LambdaHandler Runtime: python3.8 MemorySize: 10240 Timeout: 900 Description: Enrichment Engine-Complete Textract Processing and Produces Plain Text Files Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3txtPlain: !Ref S3txtPlain S3txtPlainarn: !GetAtt S3txtPlain.Arn S3txtract: !Ref S3txtract S3txtractA: !Ref S3txtractA S3Assets: !Ref S3Assets TextractSNSTopicArn: !Ref AmazonTextractSNS TextractASNSTopicArn: !Ref AmazonTextractASNS Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBCrudPolicy: TableName: !Ref AssetProcessing - DynamoDBCrudPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3txtractA - S3CrudPolicy: BucketName: !Ref S3txtract - S3CrudPolicy: BucketName: !Ref S3txtPlain - SNSCrudPolicy: TopicName: !GetAtt AmazonTextractSNS.TopicName - SNSCrudPolicy: TopicName: !GetAtt AmazonTextractASNS.TopicName Events: TextractSNSEvent1: Type: SNS Properties: Topic: !Ref AmazonTextractSNS TextractASNSEvent2: Type: SNS Properties: Topic: !Ref AmazonTextractASNS # This is a Lambda function config associated with the source code: rkImgDetectText.py rkImgDetectText: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rkImgDetectText.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Image Detect Text Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkTxtDet: !Ref S3RkTxtDet S3Assets: !Ref S3Assets rkConfidence: 40 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - RekognitionDetectOnlyPolicy: {} - S3CrudPolicy: BucketName: !Ref S3RkTxtDet - S3ReadPolicy: BucketName: !Ref S3Assets Events: imgeventJpg: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - jpg imgeventPng: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - png # This is a Lambda function config associated with the source code: rkImgDetectCelebrity.py rkImgDetectCelebrity: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rkImgDetectCelebrity.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Image Detect Celebrity Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkCeleb: !Ref S3RkCeleb S3Assets: !Ref S3Assets rkConfidence: 40 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - AmazonRekognitionReadOnlyAccess - S3CrudPolicy: BucketName: !Ref S3RkCeleb - S3ReadPolicy: BucketName: !Ref S3Assets Events: imgeventJpg: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - jpg imgeventPng: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - png # This is a Lambda function config associated with the source code: rkImgDetectLabels.py rkImgDetectLabels: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rkImgDetectLabels.LambdaHandler Runtime: python3.8 MemorySize: 1024 Timeout: 360 Description: Enrichment Engine-Image Detect Labels Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkLblDet: !Ref S3RkLblDet S3Assets: !Ref S3Assets rkConfidence: 40 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - RekognitionDetectOnlyPolicy: {} - S3CrudPolicy: BucketName: !Ref S3RkLblDet - S3ReadPolicy: BucketName: !Ref S3Assets Events: imgeventJpg: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - jpg imgeventPng: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - png # This is a Lambda function config associated with the source code: rkImgDetectFaces.py rkImgDetectFaces: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rkImgDetectFaces.LambdaHandler Runtime: python3.8 MemorySize: 1024 Timeout: 360 Description: Enrichment Engine-Image Detect Faces Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkFacDet: !Ref S3RkFacDet S3Assets: !Ref S3Assets rkConfidence: 40 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - RekognitionDetectOnlyPolicy: {} - S3CrudPolicy: BucketName: !Ref S3RkFacDet - S3ReadPolicy: BucketName: !Ref S3Assets Events: imgeventJpg: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - jpg imgeventPng: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - png # This is a Lambda function config associated with the source code: rkImgDetectFaces.py rkImgModeration: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rkImgModeration.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Image Moderation Detection Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkMod: !Ref S3RkMod S3Assets: !Ref S3Assets rkConfidence: 40 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - RekognitionDetectOnlyPolicy: {} - S3CrudPolicy: BucketName: !Ref S3RkMod - S3ReadPolicy: BucketName: !Ref S3Assets Events: imgeventJpg: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - jpg imgeventPng: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - png # This is a Lambda function config associated with the source code: rkImgDetectFaces.py rkVidDetectFaces: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/video_rekognition_facedetection.LambdaHandler Runtime: python3.8 MemorySize: 1024 Timeout: 360 Description: Enrichment Engine-Video Detect Faces Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkFacDet: !Ref S3RkFacDet S3Assets: !Ref S3Assets rkConfidence: 40 vid_rkfacedetectSNSarn: !Ref AmazonRkFaceDetSNS vid_rkfacedetectRolearn: !GetAtt RekognitionAccess.Arn Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3ReadPolicy: BucketName: !Ref S3Assets - AmazonRekognitionFullAccess - Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: - iam:PassRole - iam:GetRole Resource: !GetAtt RekognitionAccess.Arn Events: videventMP4: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - mp4 # This is a Lambda function config associated with the source code: video_rekognition_facedetectioncomplete.py rkVidDetectFacesComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/video_rekognition_facedetectioncomplete.LambdaHandler Runtime: python3.8 MemorySize: 10240 Timeout: 900 Description: Enrichment Engine-Complete Video Face Detection via rekognition Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3RkFacDet: !Ref S3RkFacDet S3Assets: !Ref S3Assets rkConfidence: 40 vid_rkfacedetectSNSarn: !Ref AmazonRkFaceDetSNS vid_rkfacedetectRolearn: !GetAtt RekognitionAccess.Arn Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBCrudPolicy: TableName: !Ref Assets - DynamoDBCrudPolicy: TableName: !Ref AssetProcessing - DynamoDBCrudPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3RkFacDet - S3ReadPolicy: BucketName: !Ref S3Assets - SNSCrudPolicy: TopicName: !GetAtt AmazonRkFaceDetSNS.TopicName - AmazonRekognitionReadOnlyAccess Events: rkvdfacdetSNSEvent1: Type: SNS Properties: Topic: !Ref AmazonRkFaceDetSNS # This is a Lambda function config associated with the source code: dominantlanguagestart.py dominantlanguageStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/dominantlanguageStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Comprehend Async Detection of Language Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3txtPlain: !Ref S3txtPlain S3txtPlainarn: !GetAtt S3txtPlain.Arn S3txtract: !Ref S3txtract S3txtractA: !Ref S3txtractA S3Assets: !Ref S3Assets S3NlpLang: !Ref S3NlpLang ComprehendAccessarn: !GetAtt ComprehendAccess.Arn AssumeRolePolicyDocument: Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: 'sts:AssumeRole' Principal: Service: - comprehend.amazonaws.com - s3.amazonaws.com - lambda.amazonaws.com Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBCrudPolicy: TableName: !Ref Assets - DynamoDBWritePolicy: TableName: !Ref AssetProcessing - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3txtract - S3CrudPolicy: BucketName: !Ref S3NlpLang - ComprehendFullAccess - Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: - iam:PassRole - iam:GetRole Resource: !GetAtt ComprehendAccess.Arn Events: txtingestion: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - txt txtalternate: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - alternateformat detail: ProcessExtension: - txt # - ComprehendBasicAccessPolicy: {} # This is a Lambda function config associated with the source code: dominantlanguagCcomplete.py dominantlanguageComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/dominantlanguageComplete.LambdaHandler Runtime: python3.8 MemorySize: 1024 Timeout: 120 Description: Enrichment Engine-Completes Comprehend Async Detection of Language Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3NlpLang: !Ref S3NlpLang AssumeRolePolicyDocument: Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: 'sts:AssumeRole' Principal: Service: - comprehend.amazonaws.com - s3.amazonaws.com - lambda.amazonaws.com Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBCrudPolicy: TableName: !Ref Assets - DynamoDBWritePolicy: TableName: !Ref ErrorTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3NlpLang - ComprehendFullAccess - Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: - iam:PassRole - iam:GetRole Resource: !GetAtt ComprehendAccess.Arn Events: dominantcompleteEvent: Type: SQS Properties: BatchSize: 1 Enabled: True MaximumBatchingWindowInSeconds: 5 Queue: !GetAtt comprehendlangQueue.Arn # This is a Lambda function config associated with the source code: comprehendStart.py comprehendStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/comprehendStart.LambdaHandler Runtime: python3.8 MemorySize: 512 Timeout: 120 Description: Enrichment Engine-Starts Comprehend NER Async Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3Assets: !Ref S3Assets S3NlpNer: !Ref S3NlpNer S3txtPlain: !Ref S3txtPlain S3txtPlainarn: !GetAtt S3txtPlain.Arn S3txtract: !Ref S3txtract S3txtractA: !Ref S3txtractA ComprehendAccessarn: !GetAtt ComprehendAccess.Arn AssumeRolePolicyDocument: Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: 'sts:AssumeRole' Principal: Service: - comprehend.amazonaws.com - s3.amazonaws.com - lambda.amazonaws.com Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBReadPolicy: TableName: !Ref AssetFormats - DynamoDBWritePolicy: TableName: !Ref ErrorTable - DynamoDBWritePolicy: TableName: !Ref AssetProcessing - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3NlpNer - S3ReadPolicy: BucketName: !Ref S3txtPlain - S3ReadPolicy: BucketName: !Ref S3Assets - S3ReadPolicy: BucketName: !Ref S3txtract - ComprehendFullAccess - Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: - iam:PassRole - iam:GetRole Resource: !GetAtt ComprehendAccess.Arn Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - enrichments detail: ProcessType: - dominantlanguage # This is a Lambda function config associated with the source code: comprehendComplete.py comprehendComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/comprehendComplete.LambdaHandler Runtime: python3.8 MemorySize: 5012 Timeout: 900 Description: Enrichment Engine-Complete Comprehend NER Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetProcessingTable: !Ref AssetProcessing AssetAttributeTable: !Ref AssetAttributes AssetHistoryTable: !Ref AssetHistory AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb S3NlpNer: !Ref S3NlpNer ComprehendAccessarn: !GetAtt ComprehendAccess.Arn rkConfidence: 60 SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable AssumeRolePolicyDocument: Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: 'sts:AssumeRole' Principal: Service: - comprehend.amazonaws.com - s3.amazonaws.com - lambda.amazonaws.com Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBCrudPolicy: TableName: !Ref Assets - DynamoDBWritePolicy: TableName: !Ref ErrorTable - DynamoDBWritePolicy: TableName: !Ref SearchTable - DynamoDBCrudPolicy: TableName: !Ref SearchAggregateTable - EventBridgePutEventsPolicy: EventBusName: !Ref meb - S3CrudPolicy: BucketName: !Ref S3NlpNer - ComprehendFullAccess - Version: '2012-10-17' # Policy Document Statement: - Effect: Allow Action: - iam:PassRole - iam:GetRole Resource: !GetAtt ComprehendAccess.Arn Events: nlpcompleteEvent: Type: SQS Properties: BatchSize: 1 Enabled: True MaximumBatchingWindowInSeconds: 5 Queue: !GetAtt comprehendnlpQueue.Arn # This is a Lambda function config associated with the source code: translateStart.py translateStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/translateStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Translate ASync Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - translationStart # This is a Lambda function config associated with the source code: translateComplete.py translateComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/translateComplete.LambdaHandler Runtime: python3.8 MemorySize: 10240 Timeout: 900 Description: Enrichment Engine-Complete the translation Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # This is a Lambda function config associated with the source code: rekognitionStart.py rekognitionStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rekognitionStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Rekognition Async Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: type: - pdf # This is a Lambda function config associated with the source code: rekognitionComplete.py rekognitionComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/rekognitionComplete.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Complete Rekognition Run. Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # This is a Lambda function config associated with the source code: transcribeStart.py transcribeStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/transcribeStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Transcription Async Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - audio detail: type: - wav # This is a Lambda function config associated with the source code: transcribeComplete.py transcribeComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/transcribeComplete.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Complete Transcribe Run. Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # This is a Lambda function config associated with the source code: elementalConvertStart.py elementalConvertStart: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/elementalConvertStart.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Starts Conversion of media formats. Async Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole Events: Trigger: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - mediaConversion detail: type: - pdf # This is a Lambda function config associated with the source code: elementalConvertComplete.py elementalConvertComplete: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/elementalConvertComplete.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Completes the processing of media type conversions. Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # This is a Lambda function config associated with the source code: loadAnalyticsStream.py loadAnalyticsStream: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/loadAnalyticsStream.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Loads events onto the analytics data stream for other systems to process Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # This is a Lambda function config associated with the source code: loadKendraIndex.py loadKendraIndex: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/loadKendraIndex.LambdaHandler Runtime: python3.8 MemorySize: 1024 Timeout: 120 Description: Enrichment Engine-Loads Kendra index as records are received. Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetFormatsTable: !Ref AssetFormats ErrorTable: !Ref ErrorTable EventBus_Name: !Ref meb Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - S3CrudPolicy: BucketName: "*" - EventBridgePutEventsPolicy: EventBusName: !Ref meb Events: orgevent: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - ingestion detail: AssetType: - pdf - txt altevent: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - alternateformat detail: ProcessExtension: - pdf # - txt #unlock this when we d transcribe, translate. Control to prevent dups # This is a Lambda function config associated with the source code: loadKendraMetadata.py loadKendraMetadata: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/loadKendraMetadata.LambdaHandler Runtime: python3.8 MemorySize: 5012 Timeout: 360 Description: Enrichment Engine-Loads Kendra index's metadata as records are received. Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: EventBus_Name: !Ref meb dtFaceConfidence: 80 srchFaceConfidence: 80 dtCelebConfidence: 80 dtLabelConfidence: 80 dtImgCapConfidence: 80 dtTextConfidence: 80 dtModerationConfidence: 80 nlpConfidence: 92 nlpMaxLabelCount: 190 Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - S3CrudPolicy: BucketName: "*" - EventBridgePutEventsPolicy: EventBusName: !Ref meb Events: enrichevent: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - enrichments # This is a Lambda function config associated with the source code: loadElasticSearch.py loadElasticSearch: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/loadElasticSearch.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Loads ElasticSearch as records are received. Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole # img2pdfConvert: # Type: AWS::Serverless::Function # Properties: # CodeUri: ./ # Handler: src/handlers/img2pdfConvert.lambda_handler # Layers: # - !Ref pillowlayer # Runtime: python3.8 # MemorySize: 1024 # Timeout: 360 # Description: Enrichment Engine-Converts images to pdf # Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object # Variables: # AssetTable: !Ref Assets # AssetProcessingTable: !Ref AssetProcessing # AssetAttributeTable: !Ref AssetAttributes # AssetHistoryTable: !Ref AssetHistory # AssetFormatsTable: !Ref AssetFormats # ErrorTable: !Ref ErrorTable # EventBus_Name: !Ref meb # S3Assets: !Ref S3Assets # Policies: # # Give Lambda basic execution Permission to the function # - AWSLambdaBasicExecutionRole # - DynamoDBReadPolicy: # TableName: !Ref Assets # - DynamoDBWritePolicy: # TableName: !Ref AssetProcessing # - DynamoDBCrudPolicy: # TableName: !Ref AssetFormats # - DynamoDBWritePolicy: # TableName: !Ref ErrorTable # - EventBridgePutEventsPolicy: # EventBusName: !Ref meb # - S3CrudPolicy: # BucketName: !Ref S3Assets # Events: # imgeventJpg: # Type: EventBridgeRule # Properties: # EventBusName: !Ref meb # Pattern: # source: # - gdit.me # detail-type: # - ingestion # detail: # AssetType: # - jpg # imgeventPng: # Type: EventBridgeRule # Properties: # EventBusName: !Ref meb # Pattern: # source: # - gdit.me # detail-type: # - ingestion # detail: # AssetType: # - png dynamodbEnrichments: Type: AWS::Serverless::Function Properties: CodeUri: ./ Handler: src/handlers/dynamodbEnrichments.LambdaHandler Runtime: python3.8 MemorySize: 128 Timeout: 120 Description: Enrichment Engine-Near Real Time Enrichment Storage Environment: #More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: AssetTable: !Ref Assets AssetEnrichmentsTable: !Ref AssetEnrichments SearchTable: !Ref SearchTable SearchAggregateTable: !Ref SearchAggregateTable EventBus_Name: !Ref meb Policies: # Give Lambda basic execution Permission to the function - AWSLambdaBasicExecutionRole - DynamoDBReadPolicy: TableName: !Ref Assets - DynamoDBWritePolicy: TableName: !Ref AssetEnrichments - DynamoDBReadPolicy: TableName: !Ref SearchTable - DynamoDBWritePolicy: TableName: !Ref SearchAggregateTable - DynamoDBWritePolicy: TableName: !Ref ErrorTable Events: enrichevent: Type: EventBridgeRule Properties: EventBusName: !Ref meb Pattern: source: - gdit.me detail-type: - enrichments # Services - S3 S3txtract: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3txtractA: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3txtPlain: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3NlpTop: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3NlpKp: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3Kendra: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3Assets: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3Translate: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true S3Transcribe: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Text Detection across img and vid S3RkTxtDet: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Segment Detection across vid S3RkSegDet: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #People tracking across video S3RkPplTrc: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Label Detection across img and vid S3RkLblDet: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Face Searching across img and vid S3RkFacSrch: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Face Detection across img and vid S3RkFacDet: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Celeb Detection across img and vid S3RkCeleb: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Moderation Detection across img and vid S3RkMod: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true #Azure Computer Vision - Describe Image S3AzureDescrImg: DeletionPolicy: Delete Type: AWS::S3::Bucket Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerEnforced AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true # Services - DynamoDB Assets: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH StreamSpecification: StreamViewType: NEW_IMAGE AssetProcessing: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST TimeToLiveSpecification: AttributeName: TTL Enabled: True AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: ProcessId AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: ProcessId KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE AssetAttributes: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: AttributeType AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: AttributeType KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE AssetEnrichments: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: Timestamp AttributeType: N KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: Timestamp KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE AssetHistory: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH StreamSpecification: StreamViewType: NEW_IMAGE AssetFormats: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: FormatType AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: FormatType KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE ErrorTable: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: Source AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: Source KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE Collections: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: CollectionId AttributeType: S KeySchema: - AttributeName: CollectionId KeyType: HASH StreamSpecification: StreamViewType: NEW_IMAGE CollectionSubscribers: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: SubscriberId AttributeType: S - AttributeName: CollectionId AttributeType: S KeySchema: - AttributeName: SubscriberId KeyType: HASH - AttributeName: CollectionId KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE SearchTable: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: Term AttributeType: S - AttributeName: Context AttributeType: S - AttributeName: AssetId AttributeType: S - AttributeName: Confidence AttributeType: N KeySchema: - AttributeName: Term KeyType: HASH - AttributeName: Context KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE GlobalSecondaryIndexes: - IndexName: "AssetIdTerm" KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: Term KeyType: RANGE Projection: ProjectionType: ALL - IndexName: "TermConfidence" KeySchema: - AttributeName: Term KeyType: HASH - AttributeName: Confidence KeyType: RANGE Projection: ProjectionType: ALL SearchAggregateTable: DeletionPolicy: Delete Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: AssetId AttributeType: S - AttributeName: ProcessType AttributeType: S - AttributeName: Context AttributeType: S KeySchema: - AttributeName: AssetId KeyType: HASH - AttributeName: ProcessType KeyType: RANGE StreamSpecification: StreamViewType: NEW_IMAGE GlobalSecondaryIndexes: - IndexName: "ContextAssetId" KeySchema: - AttributeName: Context KeyType: HASH - AttributeName: AssetId KeyType: RANGE Projection: ProjectionType: ALL # Services - Queues SQS ingestQueue: DeletionPolicy: Delete Type: AWS::SQS::Queue ingestQueuePolicy: Type: AWS::SQS::QueuePolicy Metadata: cfn-lint: config: ignore_checks: - EPolicyWildcardPrincipal - EIAMPolicyActionWildcard Properties: Queues: - Ref: ingestQueue PolicyDocument: Version: '2012-10-17' Id: IngestID Statement: - Sid: "ingestSID" Effect: Allow Principal: "*" Action: "sqs:*" Resource: !GetAtt ingestQueue.Arn S3ingest: DeletionPolicy: Delete Type: AWS::S3::Bucket DependsOn: ingestQueuePolicy Properties: AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true NotificationConfiguration: QueueConfigurations: - Event: s3:ObjectCreated:* Queue: !GetAtt ingestQueue.Arn comprehendlangQueue: DeletionPolicy: Delete Type: AWS::SQS::Queue Properties: VisibilityTimeout: 120 comprehendlangQueuePolicy: Type: AWS::SQS::QueuePolicy Metadata: cfn-lint: config: ignore_checks: - EPolicyWildcardPrincipal - EIAMPolicyActionWildcard Properties: Queues: - Ref: comprehendlangQueue PolicyDocument: Version: '2012-10-17' Id: LangID Statement: - Sid: LangSID Effect: Allow Principal: '*' Action: "sqs:*" Resource: !GetAtt comprehendlangQueue.Arn S3NlpLang: DeletionPolicy: Delete Type: AWS::S3::Bucket DependsOn: comprehendlangQueuePolicy Properties: AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true NotificationConfiguration: QueueConfigurations: - Event: s3:ObjectCreated:* Queue: !GetAtt comprehendlangQueue.Arn Filter: S3Key: Rules: - Name: suffix Value: .gz comprehendnlpQueue: DeletionPolicy: Delete Type: AWS::SQS::Queue Properties: VisibilityTimeout: 900 comprehendnlpQueuePolicy: Type: AWS::SQS::QueuePolicy Metadata: cfn-lint: config: ignore_checks: - EPolicyWildcardPrincipal - EIAMPolicyActionWildcard Properties: Queues: - Ref: comprehendnlpQueue PolicyDocument: Version: '2012-10-17' Id: nlpID Statement: - Sid: "nlpSID" Effect: Allow Principal: "*" Action: "sqs:*" Resource: !GetAtt comprehendnlpQueue.Arn S3NlpNer: DeletionPolicy: Delete Type: AWS::S3::Bucket DependsOn: comprehendnlpQueuePolicy Properties: AccessControl: LogDeliveryWrite BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: AES256 PublicAccessBlockConfiguration: BlockPublicAcls: true BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true NotificationConfiguration: QueueConfigurations: - Event: s3:ObjectCreated:* Queue: !GetAtt comprehendnlpQueue.Arn Filter: S3Key: Rules: - Name: suffix Value: .gz #AWS Resources SNS Topics AmazonTextractSNS: Type: AWS::SNS::Topic AmazonTextractASNS: Type: AWS::SNS::Topic #Rekognition Face Detection SNS topic. AmazonRkFaceDetSNS: Type: AWS::SNS::Topic #SAM appears to have not implemented custom eventbuses yet. # EventBus: # Type: AWS::Events::EventBus # Properties: # Name: !Sub '${AWS::StackName}-EventBus2' #TextractExecutionPolicy: # Type: AWS::IAM::ManagedPolicy # Properties: # PolicyDocument: # Version: '2012-10-17' # Statement: # - Sid: AllowAllUsersToListAccounts # Effect: Allow # Action: # - ec2:CreateNetworkInterface # - ec2:DescribeNetworkInterfaces # - ec2:DeleteNetworkInterface # - xray:PutTraceSegments # Resource: "*" #TextractExecutionRole: # Type: 'AWS::IAM::Role' # Properties: # AssumeRolePolicyDocument: # - TextractPolicy # ManagedPolicyArns: # - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AmazonTextractServiceRole TextractSNSRl: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: Effect: Allow Principal: Service: [ textract.amazonaws.com, cloudformation.amazonaws.com, codepipeline.amazonaws.com, sns.amazonaws.com, lambda.amazonaws.com ] Action: sts:AssumeRole ManagedPolicyArns: - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonS3FullAccess - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonTextractFullAccess - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonSNSFullAccess ComprehendAccess: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: Effect: Allow Principal: Service: [ comprehend.amazonaws.com, cloudformation.amazonaws.com, codepipeline.amazonaws.com, lambda.amazonaws.com ] Action: sts:AssumeRole ManagedPolicyArns: - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonS3FullAccess - !Sub arn:${AWS::Partition}:iam::aws:policy/ComprehendFullAccess RekognitionAccess: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: Effect: Allow Principal: Service: [ rekognition.amazonaws.com, cloudformation.amazonaws.com, codepipeline.amazonaws.com, lambda.amazonaws.com, sns.amazonaws.com ] Action: sts:AssumeRole ManagedPolicyArns: - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonS3FullAccess - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonRekognitionFullAccess - !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonSNSFullAccess Outputs: eventbridgename: Description: AWS Event Bridge Name Value: !Ref meb Export: Name: Fn::Sub: "${AWS::StackName}-eventbridgename" eventbridgearn: Description: AWS Event Bridge arn Value: !GetAtt meb.Arn Export: Name: Fn::Sub: "${AWS::StackName}-eventbridgearn" s3ingestname: Description: S3 Bucket Name for Ingestion of Content Value: !Ref S3ingest Export: Name: Fn::Sub: "${AWS::StackName}-s3ingestname" s3ingestarn: Description: S3 Bucket Arn for Ingestion of Content Value: !GetAtt S3ingest.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3ingestarn" s3txtractname: Description: S3 Bucket Name for AWS Textract Raw Data Value: !Ref S3txtract Export: Name: Fn::Sub: "${AWS::StackName}-s3txtractname" s3txtractarn: Description: S3 Bucket Arn for AWS Textract Raw Data Value: !GetAtt S3txtract.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3txtractarn" s3txtractaname: Description: S3 Bucket Name for AWS Textract analysis raw data Value: !Ref S3txtractA Export: Name: Fn::Sub: "${AWS::StackName}-s3txtractaname" s3txtractaarn: Description: S3 Bucket Arn for AWS Textract analysis raw data Value: !GetAtt S3txtractA.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3txtractaarn" s3txtplainname: Description: S3 Bucket Name for AWS plain text Value: !Ref S3txtPlain Export: Name: Fn::Sub: "${AWS::StackName}-s3txtplainname" s3txtplainarn: Description: S3 Bucket Arn for AWS plain text Value: !GetAtt S3txtPlain.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3txtplainarn" s3nlptopname: Description: S3 Bucket Name for raw AWS Comprehend data topic Value: !Ref S3NlpTop Export: Name: Fn::Sub: "${AWS::StackName}-s3nlptopname" s3nlptoparn: Description: S3 Bucket Arn for raw AWS Comprend data topic Value: !GetAtt S3NlpTop.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3nlptoparn" s3nlpkpname: Description: S3 Bucket Name for raw AWS Comprehend data key phrases Value: !Ref S3NlpKp Export: Name: Fn::Sub: "${AWS::StackName}-s3nlpkpname" s3nlpkparn: Description: S3 Bucket Arn for raw AWS Comprehend data key phrases Value: !GetAtt S3NlpKp.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3nlpkparn" s3kendraname: Description: S3 Bucket Name for AWS Kendra Value: !Ref S3Kendra Export: Name: Fn::Sub: "${AWS::StackName}-s3kendraname" s3kendraarn: Description: S3 Bucket Arn for AWS Kendra Value: !GetAtt S3Kendra.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3kendraarn" s3assetsname: Description: S3 Bucket Name for assets Value: !Ref S3Assets Export: Name: Fn::Sub: "${AWS::StackName}-s3assetsname" s3assetsarn: Description: S3 Bucket Arn for assets Value: !GetAtt S3Assets.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3assetsarn" s3translatename: Description: S3 Bucket Name for AWS Translate Value: !Ref S3Translate Export: Name: Fn::Sub: "${AWS::StackName}-s3translatename" s3translatearn: Description: S3 Bucket Arn for AWS Translate Value: !GetAtt S3Translate.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3translatearn" s3transcribename: Description: S3 Bucket Name for AWS Transcribe Value: !Ref S3Transcribe Export: Name: Fn::Sub: "${AWS::StackName}-s3transcribename" s3transcribearn: Description: S3 Bucket Arn for AWS Transcribe Value: !GetAtt S3Transcribe.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3transcribearn" s3rktxtdetname: Description: S3 Bucket Name for AWS Rekognition text detection Value: !Ref S3RkTxtDet Export: Name: Fn::Sub: "${AWS::StackName}-s3rktxtdetname" s3rktxtdetarn: Description: S3 Bucket Arn for AWS Rekognition text detection Value: !GetAtt S3RkTxtDet.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rktxtdetarn" s3rksegdetname: Description: S3 Bucket Name for AWS Rekognition video segment detection Value: !Ref S3RkSegDet Export: Name: Fn::Sub: "${AWS::StackName}-s3rksegdetname" s3rksegdetarn: Description: S3 Bucket Arn for AWS Rekognition video segment detection Value: !GetAtt S3RkSegDet.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rksegdetarn" s3rkppltrcname: Description: S3 Bucket Name for AWS Rekognition video people tracking Value: !Ref S3RkPplTrc Export: Name: Fn::Sub: "${AWS::StackName}-s3rkppltrcname" s3rkppltrcarn: Description: S3 Bucket Arn for AWS Rekognition video people tracking Value: !GetAtt S3RkPplTrc.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rkppltrcarn" s3rklbldetname: Description: S3 Bucket Name for AWS Rekognition label detection Value: !Ref S3RkLblDet Export: Name: Fn::Sub: "${AWS::StackName}-s3rklbldetname" s3rklbldetarn: Description: S3 Bucket Arn for AWS Rekognition label detection Value: !GetAtt S3RkLblDet.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rklbldetarn" s3rkfacsrchname: Description: S3 Bucket Name for AWS Rekognition face search Value: !Ref S3RkFacSrch Export: Name: Fn::Sub: "${AWS::StackName}-s3rkfacsrchname" s3rkfacsrcharn: Description: S3 Bucket Arn for AWS Rekognition face search Value: !GetAtt S3RkFacSrch.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rkfacsrcharn" s3rkfacdetname: Description: S3 Bucket Name for AWS Rekognition face detection Value: !Ref S3RkFacDet Export: Name: Fn::Sub: "${AWS::StackName}-s3rkfacdetname" s3rkfacdetarn: Description: S3 Bucket Arn for AWS Rekognition face detection Value: !GetAtt S3RkFacDet.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rkfacedetarn" s3rkcelebname: Description: S3 Bucket Name for AWS Rekognition celebrity Value: !Ref S3RkCeleb Export: Name: Fn::Sub: "${AWS::StackName}-s3rkcelebrityname" s3rkcelebrityarn: Description: S3 Bucket Arn for AWS Rekognition celebrity Value: !GetAtt S3RkCeleb.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rkcelebrityarn" s3rkmoddetname: Description: S3 Bucket Name for AWS Rekognition moderation detection Value: !Ref S3RkMod Export: Name: Fn::Sub: "${AWS::StackName}-s3rkmoddetname" s3rkmoddetarn: Description: S3 Bucket Arn for AWS Rekognition moderation detection Value: !GetAtt S3RkMod.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3rkmoddetarn" s3azdescrimgname: Description: S3 Bucket Name for Azure Describe Image Value: !Ref S3AzureDescrImg Export: Name: Fn::Sub: "${AWS::StackName}-s3azdescrimgname" s3azdescrimgarn: Description: S3 Bucket Arn for Azure Describe Image Value: !GetAtt S3AzureDescrImg.Arn Export: Name: Fn::Sub: "${AWS::StackName}-s3azdescrimgarn" dbassetsname: Description: DynamoDB Table Name for Assets Value: !Ref Assets Export: Name: Fn::Sub: "${AWS::StackName}-dbassetsname" dbassetsarn: Description: DynamoDB Table arn for Assets Value: !GetAtt Assets.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetsarn" dbassetsstreamarn: Description: DynamoDB Table stream arn for Assets Value: !GetAtt Assets.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetsstreamarn" dbassetprocessingname: Description: DynamoDB Table Name for Asset Processing Value: !Ref AssetProcessing Export: Name: Fn::Sub: "${AWS::StackName}-dbassetprocessingname" dbassetprocessingarn: Description: DynamoDB Table arn for Asset Processing Value: !GetAtt AssetProcessing.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetprocessingarn" dbassetprocessingstreamarn: Description: DynamoDB Table stream arn for Asset Processing Value: !GetAtt AssetProcessing.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetprocessingstreamarn" dbassetattributesname: Description: DynamoDB Table Name for Asset Attributes Value: !Ref AssetAttributes Export: Name: Fn::Sub: "${AWS::StackName}-dbassetattributesname" dbassetattributesarn: Description: DynamoDB Table arn for Asset Attributes Value: !GetAtt AssetAttributes.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetattributesarn" dbassetattributesstreamarn: Description: DynamoDB Table stream arn for Asset Attributes Value: !GetAtt AssetAttributes.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetattributesstreamarn" dbassetenrichmentsname: Description: DynamoDB Table Name for Asset Enrichments Value: !Ref AssetEnrichments Export: Name: Fn::Sub: "${AWS::StackName}-dbassetenrichmentsname" dbassetenrichmentsarn: Description: DynamoDB Table arn for Asset Enrichments Value: !GetAtt AssetEnrichments.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetenrichmentsarn" dbassetenrichmentsstreamarn: Description: DynamoDB Table stream arn for Asset Enrichments Value: !GetAtt AssetEnrichments.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetenrichmentsstreamarn" dbassethistoryname: Description: DynamoDB Table Name for Asset History Value: !Ref AssetHistory Export: Name: Fn::Sub: "${AWS::StackName}-dbassethistoryname" dbassethistoryarn: Description: DynamoDB Table arn for Asset History Value: !GetAtt AssetHistory.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassethistoryarn" dbassethistorystreamarn: Description: DynamoDB Table stream arn for Asset History Value: !GetAtt AssetHistory.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassethistorystreamarn" dbassetformatsname: Description: DynamoDB Table Name for Asset Formats Value: !Ref AssetFormats Export: Name: Fn::Sub: "${AWS::StackName}-dbassetformatsname" dbassetformatsarn: Description: DynamoDB Table arn for Asset Formats Value: !GetAtt AssetFormats.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetformatsarn" dbassetformatsstreamarn: Description: DynamoDB Table stream arn for Asset Formats Value: !GetAtt AssetFormats.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbassetformatsstreamarn" dberrorname: Description: DynamoDB Table Name for Errors Value: !Ref ErrorTable Export: Name: Fn::Sub: "${AWS::StackName}-dberrorname" dberrorarn: Description: DynamoDB Table arn for Errors Value: !GetAtt ErrorTable.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dberrorsarn" dberrorstreamarn: Description: DynamoDB Table stream arn for Errors Value: !GetAtt ErrorTable.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dberrorstreamarn" dbcollectionsname: Description: DynamoDB Table Name for Collections Value: !Ref Collections Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsname" dbcollectionsarn: Description: DynamoDB Table arn for Collections Value: !GetAtt Collections.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsarn" dbcollectionsstreamarn: Description: DynamoDB Table stream arn for Collections Value: !GetAtt Collections.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsstreamarn" dbcollectionsubscribersname: Description: DynamoDB Table Name for CollectionSubscribers Value: !Ref CollectionSubscribers Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsubscribersname" dbcollectionsubscribersarn: Description: DynamoDB Table arn for CollectionSubscribers Value: !GetAtt CollectionSubscribers.Arn Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsubscribersarn" dbcollectionsubscribersstreamarn: Description: DynamoDB Table stream arn for CollectionSubscribers Value: !GetAtt CollectionSubscribers.StreamArn Export: Name: Fn::Sub: "${AWS::StackName}-dbcollectionsubscribersstreamarn"