Architecture overview
This section provides a reference implementation architecture diagram for the components deployed with this solution.
Architecture diagram
Deploying this solution with the default parameters deploys the following components in your AWS account.
![Depicts Media Insights on AWS architecture](/images/solutions/latest/media-insights-on-aws/images/media-insights-on-aws-architecture-diagram.png)
Media Insights on AWS architecture
Note
AWS CloudFormation resources are created from AWS Cloud Development Kit (AWS CDK) constructs.
The high-level process flow for the solution components deployed with the AWS CloudFormation template is as follows:
-
An Amazon API Gateway
resource for the control plane REST API. This resource is the entry point where requests to create, read, update, delete (CRUD) or run workflows begin. -
AWS Lambda
and Amazon Simple Queue Service (Amazon SQS) resources to support workflow orchestration and translating user-defined workflows into AWS Step Functions . A Lambda function updates workflow-related tables in Amazon DynamoDB , at which point CRUD workflow requests finish. Requests to run workflows begin when another Lambda function saves the request to an Amazon SQS queue. The queue is later read and run by the WorkflowScheduler Lambda function that controls how many workflows can run at the same time. -
Amazon DynamoDB tables to store workflow-related data, such as state machine definitions for operators, workflow configurations, and workflow run status.
-
A Step Functions resource that is created when a user defines a new workflow using the workflow API. When the WorkflowScheduler Lambda function starts a workflow, it starts the Step Functions resource, which then invokes a series of Lambda functions that call external services and download results from those services. When all of the Lambda functions in a workflow have fully run, then a Lambda function is called to update the workflow status in DynamoDB.
-
Lambda functions for using the following commonly used services in Media Insights on AWS workflows: Amazon Rekognition
, Amazon Comprehend , Amazon Translate , Amazon Transcribe , Amazon Polly , and AWS Elemental MediaConvert . Operators consist of Lambda functions that call external services and download results from those services. They are invoked by a state machine in Step Functions, as prescribed by the workflow definition. These Lambda functions save results to long-term storage via the data plane REST API. -
An Amazon API Gateway resource for the data plane REST API. Operators save results to long-term storage by calling this API.
-
Amazon Simple Storage Service
(Amazon S3), DynamoDB, and DynamoDB Streams for media and metadata data storage. The Lambda function behind the data plane API directly accesses Amazon S3 and DynamoDB to perform incoming CRUD requests. That Lambda function saves files, such as binary media files or JSON metadata files, in Amazon S3. A pointer to those files is saved in a DynamoDB table. Finally, a time-ordered sequence of modifications to that table are saved in a DynamoDB Stream and an Amazon Kinesis Data Streams resource. -
Amazon Kinesis Data Streams
for interfacing with external applications. A Kinesis data stream provides an interface for external applications to access data stored in the Media Insights on AWS data plane. This interface is appropriate for feeding downstream data stores, such as the Amazon OpenSearch Service or Amazon Neptune , that support specialized data access patterns required by end-user applications. To feed a downstream data store, you must implement a consumer (for example, a Lambda function) that consumes records from the data stream and performs the necessary ETL tasks needed for the external application.
Note
The ETL tasks that feed downstream data stores are use case dependent and therefore must be user-defined. The Media Insights on AWS Developer guide includes detailed instructions for implementing ETL functions in Media Insights on AWS.