https://github.com/awslabs/aws-media-replay-engine
Media Replay Engine (MRE) is a framework to build automated video clipping and replay (highlight) generation pipelines for live and video-on-demand content.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Repository
Media Replay Engine (MRE) is a framework to build automated video clipping and replay (highlight) generation pipelines for live and video-on-demand content.
Basic Info
Statistics
- Stars: 100
- Watchers: 6
- Forks: 25
- Open Issues: 11
- Releases: 15
Metadata Files
README.md

Media Replay Engine (MRE) is a framework for building automated video clipping and replay (highlight) generation pipelines using AWS services for live and video-on-demand (VOD) content. With MRE, you can focus on building the business logic around video clipping without worrying about pipeline orchestration, data movement and persistence.
MRE supports the following features:
- Catchup Replay generation
- After event Replay generation
- Integration with MediaLive for processing live or VOD content
- Event and Replay video export in MP4 and HLS formats
- Event and Replay data export in EDL and JSON formats
This repository contains the core MRE Framework which is a set of secure REST APIs that you can interact with directly. It also contains the MRE Frontend application built using React if you are someone who prefers the ease-of-use of a graphical user interface (GUI) to interact with the APIs.
To get a head start in building automated video clipping pipelines using the MRE framework, check out the MRE Samples repository which contains sample Plugins, Profiles and ML Model Notebooks for performing feature detection for clip selection and prioritization.
Install
Prerequisites
- python == 3.11
- aws-cli
- aws-cdk >= 2.24.1
- docker
- node >= 20.10.0
- npm >= 10.2.3
- git
Deploying MRE using EC2
Using an Amazon EC2 Instance is the SUPPORTED and RECOMMENDED method to install MRE.
- Use the
env-init.shscript as User Data when launching your EC2 instance to automatically install all prerequisites.- Please ensure that you configure your EC2 Instance Profile IAM Role with the correct permissions to support CDK (Cloud Development Kit) operations(see
env-role-permissions.jsonfor policy statement example.).Tested configuration:
- Amazon Linux 2023 (AL2023)
- Architecture: x86_64
- Instance Type: t3.large
- EBS Storage: 16 GB gp3 (minimum requirement)
SSH into the EC2 Instance. You will activate the Python virtual environment prior to deployment (see
env-init.shfor example).Configure a AWS profile using the
aws configurecommand. Ensure that the AWS profile works.Follow steps outlined in section Greenfield Deployment to start MRE deployment.
:heavyexclamationmark: IMPORTANT: You are responsible for stopping or terminating your EC2 instance after deployment to avoid unnecessary charges
Greenfield Deployment
Greenfield deployment of MRE is suitable for customers who are looking to install from scratch.
Run the following commands to build and deploy MRE. Be sure to define values for REGION and VERSION first.
REGION=[specify the AWS region. For example, us-east-1]
VERSION=2.10.0
git clone https://github.com/awslabs/aws-media-replay-engine
cd aws-media-replay-engine
cd deployment
./build-and-deploy.sh --enable-ssm-high-throughput --version $VERSION --region $REGION [--profile <aws-profile> --admin-email <admin-email>]
To deploy MRE with Generative AI capabilities, such as natural language clip search, run the following command
./build-and-deploy.sh --enable-ssm-high-throughput --enable-generative-ai --version $VERSION --region $REGION [--profile <aws-profile> --admin-email <admin-email>]
Upgrading
MRE Backend
In order to upgrade MRE Backend (StepFunctions, Lambda, API Gateway, EventBridge Rules, etc.), run the following commands. Be sure to define values for REGION and VERSION first.
REGION=[specify the AWS region. For example, us-east-1]
VERSION=2.10.0
git clone https://github.com/awslabs/aws-media-replay-engine
cd aws-media-replay-engine
cd deployment
./build-and-deploy.sh --disable-ui --version $VERSION --region $REGION [--profile <aws-profile>]
MRE Frontend
MRE uses AWS Amplify which offers a fully managed CI/CD and hosting service to deploy frontend apps on AWS by connecting to a Git repository such as GitHub or GitLab. As a part of MRE Greenfield deployment, AWS Amplify temporarily uses Amazon S3 to store the branch assets while deploying.
To upgrade MRE Frontend to the latest version, follow the below steps. Be sure to define a value for REGION which is typically where MRE Frontend is already deployed.
- After cloning the repo from GitHub, navigate to aws-media-replay-engine/source/frontend/cdk folder.
- Run the following commands to update the Amplify Environment variables and/or Custom headers.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
NOTE: The warning message about redeploying the frontend application after running the above command can be ignored as we will be doing that shortly. * Run
python3 create-env-file.py $REGION Update* Runnpm i --legacy-peer-deps && npm run buildfrom aws-media-replay-engine/source/frontend folder * Navigate to aws-media-replay-engine/source/frontend/build folder and zip the build assets usingzip -r -q -X ./build.zip ** Runpython3 init-amplify.py $REGION Updatefrom aws-media-replay-engine/source/frontend/cdk folder
Run Frontend Locally
If you have the MRE Framework deployed to AWS you can configure and run the MRE frontend without having to redeploy the frontend stack. This can be useful if you want to quickly experiment and tinker with the user interface.
- Firstly you want to configure the frontend to use the correct AWS resources, you can create a .env file in the aws-media-replay-engine/source/frontend folder by copying the env.template file (executing
python3 create-env-file.py $REGIONwill also create a .env file for you) - Fill in this env file with the correct information, this can all be found in the outputs of the MRE cloudformation stacks.
- Once the .env file is filled you can now install and run the MRE frontend from your local machine with the below commands:
npm i --legacy-peer-deps
npm run start
- This will install the packages needed by the frontend and then run it on localhost:3000. Be sure that you have Node 20.10.0 installed for this to work as intended.
Outputs
If you choose to interact with the MRE framework using the REST APIs directly, you will need the below information from the Outputs tab of the ControlPlane CloudFormation stack:
- EndpointURL is the endpoint for accessing the APIs to create, read, update, delete (CRUD) Plugins, Models, Profiles, and schedule Events, Replays for processing.
Architecture Overview

Architecture Components
Control plane
The control plane is an API Gateway endpoint that includes APIs to create and manage different components of the video clipping and highlights generation process. These include:
Segmentation and Detection Pipeline- An AWS Step Functions state machine generated dynamically with one or more user-defined Plugins (Lambda functions) to identify the mark-in (start) and mark-out (end) timestamp of the segments (clips) as well as detect interesting actions happening within those segments. To help decide the outcome of its analysis, a Plugin can optionally depend on a user-defined AI/ML model hosted either in AWS using services such as Rekognition, SageMaker, etc. or outside AWS. The pipeline is also configured to automatically publish different segmentation event notifications to an EventBridge event bus monitored by MRE for event-based downstream processing.Clip Generation- A pre-defined AWS Step Functions state machine that is invoked as a part of the Segmentation and Detection pipeline to generate MP4 preview clips (for the GUI) and HLS manifest using the mark-in and mark-out timestamps of the identified segments. Clip generation, like the Segmentation and Detection pipeline, sends clip related event notifications to the MRE EventBridge event bus.Replay Generation- Another pre-defined AWS Step Functions state machine which automatically selects segments containing key events to create Replay (Highlight) in various resolutions in popular video formats such as HLS and MP4. Replays can be chosen to be created in Catchup mode or after an Event is fully streamed and is completely event driven via Amazon EventBridge rules.Segment Caching- A custom Lambda function that caches segments and feature data retrieved from DynamoDB on-the-fly (i.e., while an event is being processed) into S3. This cache gets used when generating replays thereby decreasing the overall latency in Replay creation.Data Export- Exports Event and Replay data into popular formats such as EDL and JSON via clip generation events triggered through Amazon EventBridge. This data can be optionally enriched (via a custom process) and ingested into video editing systems to create engaging fan user experience by overlaying video and other key event data on a timeline.
Data plane
The data plane is an API Gateway endpoint that includes APIs with which the Plugins within the Segmentation and Detection pipeline can store and retrieve media assets as well as the processing metadata. There are also quite a few helper APIs available in the data plane that the Plugins can use for performing complex data queries and manipulations.
Generative AI Search
Generative AI search uses a lambda function url to expose an API that embeds user queries, searches through plugin results stored in an OpenSearch Serverless Collection and provides relevant plugin segments for the query. The plugin uses a streaming response to provide results back to the caller.
Code Layout
| Path | Description | |:--- |:------------| | deployment/ | shell scripts and Dockerfile | | deployment/build-and-deploy.sh | shell script to build and deploy the solution using AWS CDK | | deployment/lambdalayerfactory/Dockerfile | install dependencies and create a container image | | deployment/lambdalayerfactory/docker-entrypoint.sh | shell script to build and package the Lambda layers as zip files within the container | | deployment/lambdalayerfactory/build-lambda-layer.sh | shell script to run docker for building and packaging the Lambda layers | | docs/ | shell scripts and code to build and deploy the API docs from source | | samples/ | folder containing sample plugins, profiles, and ML model notebooks | | source/ | source code folder | | source/frontend/ | source code folder for the Frontend application | | source/api/controlplane/ | source code folder for the control plane | | source/api/controlplane//infrastructure/ | control plane CDK application | | source/api/controlplane//runtime/ | control plane Chalice application | | source/api/dataplane/ | source code folder for the data plane | | source/api/dataplane/infrastructure/ | data plane CDK application | | source/api/dataplane/runtime/ | data plane Chalice application | | source/api/search/infrastructure/ | generative ai search CDK application | | source/lib/ | source code folder for the custom Lambda layers | | source/lib/MediaReplayEnginePluginHelper/ | source code for the MediaReplayEnginePluginHelper library | | source/lib/MediaReplayEngineWorkflowHelper/ | source code for the MediaReplayEngineWorkflowHelper library | | source/gateway/infrastructure/ | API Gateway CDK application| | source/gateway/runtime/ | API Gateway Chalice application| | source/shared/infrastructure/ | Shared resources CDK application| | source/backend/caching/infrastructure/ | Segment Caching CDK application| | source/backend/caching/runtime/ | Segment Caching related Lambda functions| | source/backend/clipgeneration/infrastructure/ | ClipGeneration CDK application| | source/backend/clipgeneration/runtime/ | ClipGeneration related Lambda functions| | source/backend/dataexport/infrastructure/ | Data Export CDK application| | source/backend/dataexport/runtime/ | Data Export related Lambda functions| | source/backend/event-life-cycle/infrastructure/ | Event life cycle CDK application| | source/backend/event-life-cycle/runtime/ | Event life cycle related Lambda functions| | source/backend/replay/infrastructure/ | Replay CDK application| | source/backend/replay/runtime/ | Replay related Lambda functions| | source/backend/workflowtrigger/infrastructure/ | Workflow Trigger CDK application| | source/backend/workflowtrigger/runtime/ | Workflow Trigger related Lambda functions|
Demo
Check out Create automated intelligent highlights and replays in AWS M&E Demo Landing Page to watch a demo of an automated Football (Soccer) video clipping pipeline built using MRE.
Developers
To know more about how MRE works and for instructions on how to build a video clipping application with MRE, refer to the Developer Guide.
Security
MRE uses AWS_IAM to authorize REST API requests for both the Control and Data planes. The following screenshot shows how to test authentication to the MRE Control plane API using Postman. Be sure to specify the AccessKey and SecretKey for your own AWS environment.

Improve HTTPS viewer connection security
The CloudFront distribution deployed by MRE allows for SSLv3 or TLSv1 for HTTPS viewer connections. However, it is recommended that customers help protect viewer connections by specifying a viewer certificate that enforces a minimum of TLSv1.2 in the security policy. In order to enforce TLSv1.2 in the security policy, update the Cloudfront Distribution by specifying a CNAME and the location of the SSL/TLS certificate. For more information on this, please refer to Cloudfront Distribution Viewer Certificate
:heavyexclamationmark: Important!
After a CNAME has been configured for the MRE Cloudfront distribution, be sure to execute the following steps to reflect this change within MRE deployment.
- Navigate to AWS Systems Manager in the AWS Management console. Choose Parameter store and replace the value of the parameter /MRE/ControlPlane/MediaOutputDistribution with the CNAME of the MRE Cloudfront distribution.
- Navigate to AWS Amplify in the AWS Management console. Under All apps, choose mre_frontend. In the left pane, under app settings, choose Environment Variables. Change the value of the environment variable REACTAPPCLOUDFRONTDOMAINNAME to the CNAME of the MRE Cloudfront distribution.
- In the left pane, under app settings, choose Custom Headers. Edit the Header information by replacing the the default MRE Cloudfront distribution url with the CNAME of the MRE Cloudfront distribution.
- Within the AWS Amplify console, under All apps, choose MRE Frontend. Click on Build and then click on Redeploy this version. This will redeploy the MRE frontend taking into account the new CNAME for the Cloudfront distribution.
Cost
You are responsible for the cost of the AWS services used while running this solution.
Approximate cost (excluding free tiers)
| AWS Service | Quantity | Cost | | --- | --- | --- | | Amazon API Gateway | 150000 requests | $0.05 | | Amazon DynamoDB | 750000 writes, 146250 reads, 0.30 GB storage | $0.13 | | AWS Lambda | 12000 invocations, 2-minute avg. duration, 256 MB memory | $4.80 | | AWS Step Functions | 92400 state transitions | $2.21 | | Amazon S3 | 10 GB storage, 4000 PUT requests, 4000 GET requests | $0.25 | | AWS Elemental MediaConvert | 240 minutes | $1.80 | | Amazon Rekognition | 9000 Image analysis, 3 Custom Label inference units | $22.32 | | Amazon SageMaker | 2 inference endpoints | $5.13 | | Amazon Bedrock | Embedding 100000 input tokens with Amazon Titan Text Embeddings V2 | $2.00 | | Amazon OpenSearch Serverless | 10 GB Storage, 1 OCU hour for indexing, 1 OCU hour for search | $0.72 |
These cost estimates are for a video clipping and replay (highlight) generation pipeline built using MRE to segment a Tennis game with a duration of 3 hours. This specific pipeline had a total of 4 plugins included in the profile (with 2 of those plugins using Machine Learning models hosted in Rekognition and SageMaker). At the end of the game, the pipeline outputed a total of 282 Tennis clips.
NOTE: For tips on how to reduce the processing cost of a pipeline built using MRE, please refer to the Operations Developer Guide.
Limitations
While MRE deploys all the relevant AWS resources to facilitate automated video clipping and replay generation pipelines, you are still responsible for managing the service limits of those AWS resources via either AWS Service Quotas or AWS Support Center.
MRE currently uses a custom resource provider (based on Lambda) to work around a known AWS CDK limitation (https://github.com/aws/aws-cdk/issues/12246) by creating the DynamoDB GSIs programmatically and polling them periodically to know when they become active. As of today, the custom resource provider in CDK has a maximum timeout limit of 2 hours and in some cases where the PluginResult table has more data (>20 GB), it could cause the Dataplane stack deployment to fail (especially when upgrading MRE to v2.5.1 or later). If this happens to you, please try one of the following workarounds:
- Delete old and unwanted Events via the MRE Frontend or
DELETE /event/{name}/program/{program}Controlplane API. - Backup existing PluginResult table, purge it, rerun the MRE installer, and then restore the data from backup.
- Delete old and unwanted Events via the MRE Frontend or
Uninstall
Option 1: Uninstall using AWS CDK
```
Delete the Frontend stack
cd aws-media-replay-engine/source/frontend/cdk
cdk destroy [--profile
Delete the Gateway API stack
cd aws-media-replay-engine/source/gateway/infrastructure
cdk destroy [--profile
Delete the Generative AI Search
cdk aws-media-replay-engine/source/api/search/infrastructure
cdk destroy [--profile
Delete the Dataplane stack
cd aws-media-replay-engine/source/api/dataplane/infrastructure
cdk destroy [--profile
Delete the Controlplane stacks
cd aws-media-replay-engine/source/api/controlplane/replay/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/event/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/workflow/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/profile/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/promptcatalog/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/plugin/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/model/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/system/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/contentgroup/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/controlplane/program/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/api/custompriorities/program/infrastructure
cdk destroy [--profile
Delete the remaining stacks
cd aws-media-replay-engine/source/backend/workflow_trigger/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/backend/replay/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/backend/event-life-cycle/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/backend/data_export/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/backend/clipgeneration/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/backend/caching/infrastructure
cdk destroy [--profile
cd aws-media-replay-engine/source/shared/infrastructure
cdk destroy [--profile
Option 2: Uninstall using script
- Execute
uninstall.sh
Option 3: Uninstall using the AWS Management Console
- Sign-in to the AWS CloudFormation console.
- Select the MRE Frontend stack.
- Choose Delete.
- Select the aws-mre-gateway stack.
- Choose Delete.
- If you encluded
--enable-generative-aias a flag in your MRE deployment, select the aws-mre-genai-search stack, and choose delete - Select the MRE Dataplane stack (aws-mre-dataplane).
- Choose Delete.
- Select all Controlplane stacks with the prefix "aws-mre-controlplane-" and delete them in the the order as outlined in the section Option 1 (Uninstall using AWS CDK).
- Select and delete the following stacks
- aws-mre-workflow-trigger
- aws-mre-replay-handler
- aws-mre-event-scheduler
- aws-mre-event-life-cycle
- aws-mre-data-exporter
- aws-mre-clip-generation
- aws-mre-segment-caching
- aws-mre-shared-resources
Option 4: Uninstall using AWS Command Line Interface
```
aws cloudformation delete-stack --stack-name
aws cloudformation delete-stack --stack-name
aws cloudformation delete-stack --stack-name
aws cloudformation delete-stack --stack-name
Repeat this command for all stacks with the prefix aws-mre-controlplane- Delete the controlplane stacks in the the order as outlined in the section Option 1 (Uninstall using AWS CDK).
aws cloudformation delete-stack --stack-name <aws-mre-controlplane-*> --region <aws-region>
Delete the remaining Stacks
aws cloudformation delete-stack --stack-name aws-mre-workflow-trigger --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-replay-handler --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-event-scheduler --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-event-life-cycle --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-data-exporter --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-clip-generation --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-segment-caching --region <aws-region>
aws cloudformation delete-stack --stack-name aws-mre-shared-resources --region <aws-region>
Deleting S3 buckets created by MRE
MRE creates 5 S3 buckets that are not automatically deleted. To delete these buckets, follow the steps below:
- Sign in to the Amazon S3 console.
- Select the
LambdaLayerBucketbucket. - Choose Empty.
- Choose Delete.
- Select the
MreMediaSourceBucketbucket. - Choose Empty.
- Choose Delete.
- Select the
MreMediaOutputBucketbucket. - Choose Empty.
- Choose Delete.
- Select the
MreSegmentCacheBucketbucket. - Choose Empty.
- Choose Delete.
- Select the
MreDataExportBucketbucket. - Choose Empty.
- Choose Delete.
- Select the
MreAccessLogsBucketbucket. - Choose Empty.
- Choose Delete.
To delete the S3 bucket using AWS CLI, run the following command:
aws s3 rb s3://<bucket-name> --force
Bucket Policy (BYOB)
When utilizing a bucket where you are not the owner, only the bucket owner can configure notifications on a bucket. However, bucket owners can use a bucket policy to grant permission to other users to set this configuration with s3:PutBucketNotification permission.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TriggerPermission",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "s3:PutBucketNotification",
"Resource": "arn:aws:s3:::{BUCKET_NAME}",
"Condition": {
"StringEquals": {
"aws:SourceAccount": "{ACCOUNT_NUMBER}"
}
}
}
]
}
If you have a restrictive bucket policy that would explicitly prevent bucket access when providing your own bucket to MRE workflow- add the following policy to your bucket to allow access
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "MediaConvertRoleGet",
"Principal": {
"AWS": "arn:aws:iam::{ACCOUNT_NUMBER}:role/{MREMediaConvertIamRole from aws-mre-shared-resources stack}"
},
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::{BUCKET_NAME}",
"arn:aws:s3:::{BUCKET_NAME}/*"
]
},
{
"Sid": "ProbeVideoRoleGet",
"Principal": {
"AWS": "arn:aws:iam::{ACCOUNT_NUMBER}:role/{ProbeVideoLambdaRole from aws-mre-controlplane-profile stack}"
},
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::{BUCKET_NAME}",
"arn:aws:s3:::{BUCKET_NAME}/*"
]
},
{
"Sid": "AllowS3Trigger",
"Principal": {
"AWS": "arn:aws:iam::{ACCOUNT_NUMBER}:role/{ChaliceRole from aws-mre-controlplane-event stack}"
},
"Effect": "Allow",
"Action": [
"s3:*BucketNotification*",
],
"Resource": [
"arn:aws:s3:::{BUCKET_NAME}"
]
},
{
"Sid": "AllowS3Selection",
"Principal": {
"AWS": "arn:aws:iam::{ACCOUNT_NUMBER}:role/{ChaliceRole from aws-mre-controlplane-system stack}"
},
"Effect": "Allow",
"Action": [
"s3:List*Bucket*"
],
"Resource": [
"arn:aws:s3:::{BUCKET_NAME}"
]
}
]
}
MRE Security Considerations
1. Amazon API Gateway
This solution deploys an Amazon API Gateway REST API and uses the default API endpoint and SSL certificate. The default API endpoint supports TLSv1 security policy. It is recommended to use the TLS12 security policy to enforce TLSv1.2+ with your own custom domain name and custom SSL certificate. For more information, refer to choosing a minimum TLS version for a custom domain in API Gateway as documented in the Amazon API Gateway Developer Guide.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-custom-domain-tls-version.html https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html
2. Amazon Bedrock
Setting up Bedrock Guardrails
Amazon Bedrock Guardrails helps implement safeguards in your generative AI applications by filtering harmful content and protecting sensitive information. To set up guardrails for MRE:
Sign in to the AWS Management Console and open the Amazon Bedrock console.
From the left navigation pane, select Guardrails, then choose Create guardrail.
In the Guardrail details section:
- Provide a meaningful name and description for your guardrail
- Enter appropriate blocked messages for prompts and responses
- (Optional) Configure custom encryption settings using AWS KMS
For Guardrail creation options, you can either:
- Select Quick create with toxicity filters to use default settings
- Choose Create your own guardrail to customize settings
Configure the following guardrail components as needed:
- Content filters - Block or mask harmful content categories
- Denied topics - Define specific topics to block
- Word filters - Block specific words or phrases
- Sensitive information filters - Configure PII detection and masking
After creating the guardrail, note the Guardrail ID as you'll need it to associate with your MRE applications.
To use the guardrail with MRE:
- Update your IAM roles to include permissions for Bedrock Guardrails
- Associate the guardrail ID when creating or updating MRE agents
- Monitor guardrail effectiveness through CloudWatch logs
The guardrail will help ensure MRE maintain appropriate content standards and protect sensitive information during processing.
3. Use Customer managed KMS key
By default, MRE encrypts data at rest using service's own AWS-owned KMS key. If you want the option to be able to bring your own keys, manage and audit the encryption and decryption of your data, consider encrypting data using Customer owned KMS keys called Customer Managed Keys(CMKs) . There are multiple options of storing these CMKs. You can use a native KMS key, a key stored in AWS CloudHSM, or an external key store. This allows you to manage access to data based on authorization of the KMS key.
Enabling Optional Data Export Features
For cost optimization, MRE disables some data export features out of the Box. To enable them, follow these steps.
Event Data Export - Within Amazon EventBridge, enable the rule named aws-mre-data-exporter-MREEventDataExportRule
EDL Export - Within Amazon EventBridge, enable the rule named aws-mre-clip-generation-MREEventEndRule
Contributing
See the CONTRIBUTING file for how to contribute.
License
The MRE Samples is licensed under MIT-0 license while the rest of the project is licensed under Apache-2.0 license.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Create event: 13
- Release event: 1
- Issues event: 3
- Watch event: 14
- Delete event: 9
- Issue comment event: 20
- Push event: 20
- Pull request event: 26
- Fork event: 9
Last Year
- Create event: 13
- Release event: 1
- Issues event: 3
- Watch event: 14
- Delete event: 9
- Issue comment event: 20
- Push event: 20
- Pull request event: 26
- Fork event: 9
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 16
- Total pull requests: 29
- Average time to close issues: 3 months
- Average time to close pull requests: 11 days
- Total issue authors: 12
- Total pull request authors: 5
- Average comments per issue: 2.38
- Average comments per pull request: 0.31
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 21
Past Year
- Issues: 1
- Pull requests: 13
- Average time to close issues: N/A
- Average time to close pull requests: 9 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.31
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 10
Top Authors
Issue Authors
- marcos-acosta (4)
- deadcore (2)
- Laazarus (2)
- KyeongTaeHoon (1)
- raban33 (1)
- BenvanNoorden (1)
- erosmontin (1)
- EdoardoNovara (1)
- gvasquez95 (1)
- joshua-haunty (1)
- fucksmile (1)
- gvasels-aws (1)
- brandoncroberts (1)
- davep76 (1)
Pull Request Authors
- dependabot[bot] (35)
- aravindkaws (3)
- deadcore (3)
- SaiBKilli (1)
- hauph (1)
- sbkilli (1)
- imcarp (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- @emotion/react ^11.1.4
- @emotion/styled ^11.0.0
- @material-ui/core 4.11.3
- @material-ui/icons 4.11.2
- aws-amplify ^3.3.4
- aws-cloudfront-sign ^2.2.0
- clsx ^1.1.1
- history ^5.0.0
- lodash ^4.17.21
- material-ui ^0.20.2
- moment ^2.29.1
- moment-duration-format ^2.3.2
- randomcolor ^0.6.2
- react ^16.8.6
- react-datetime-picker ^3.3.0
- react-dom ^16.8.6
- react-hls-player ^3.0.7
- react-player ^2.9.0
- react-router-dom 5.2.0
- react-scripts ^4.0.3
- recharts ^2.0.9
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- constructs >=10.0.0
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- rsa ==4.7.2
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- boto3 <2.0.0
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk.aws-amplify-alpha >=2.24.1a0,<3.0
- boto3 <2.0.0
- constructs >=10.0.0
- git-remote-codecommit *
- aws-cdk-lib >=2.24.1,<3.0
- chalice *
- PyJWT ==2.4.0
- boto3 <2.0.0
- chalice *
- requests *
- requests-aws4auth ==1.1.1
- requests *
- requests-aws4auth *
- urllib3 *
- requests *
- requests-aws4auth *
- urllib3 *
- aws-cdk-lib >=2.24.1,<3.0
- amazonlinux latest build
- aws-cdk-lib >=2.24.1,<3.0
- boto3 <2.0.0
- ubuntu 16.04 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- @babel/plugin-proposal-private-property-in-object latest development
- @emotion/react ^11.1.4
- @emotion/styled ^11.0.0
- @material-ui/core 4.11.3
- @material-ui/icons 4.11.2
- aws-amplify ^6.0.8
- clsx ^2.0.0
- history ^5.3.0
- lodash ^4.17.21
- material-ui ^0.20.2
- moment ^2.29.4
- react ^18.2.0
- react-cookie ^4.0.3
- react-dom ^18.2.0
- react-hls-player ^3.0.7
- react-player ^2.14.1
- react-router-dom 6.21.1
- react-scripts 5.0.1
- save ^2.4.0
- screenfull ^5.1.0
- Babel ==2.12.1
- Jinja2 ==3.1.3
- MarkupSafe ==2.1.3
- PyJWT ==2.4.0
- PyYAML ==6.0.1
- Pygments ==2.16.1
- Sphinx ==6.0.0
- WebOb ==1.8.7
- WebTest ==3.0.0
- alabaster ==0.7.13
- attrs ==23.1.0
- autodoc ==0.5.0
- beautifulsoup4 ==4.12.2
- blessed ==1.20.0
- boto3 ==1.26.25
- botocore ==1.29.165
- certifi ==2023.7.22
- chalice ==1.29.0
- chalicedoc ==0.3
- charset-normalizer ==3.2.0
- click ==8.1.7
- decorator ==5.1.1
- docutils ==0.19
- idna ==3.7
- imagesize ==1.4.1
- inquirer ==2.10.1
- jmespath ==1.0.1
- jsonschema ==4.17.3
- packaging ==23.1
- pyasn1 ==0.5.0
- pyrsistent ==0.19.3
- python-dateutil ==2.8.2
- python-editor ==1.0.4
- readchar ==4.0.5
- requests ==2.31.0
- requests-aws4auth ==1.1.1
- rsa ==4.7.2
- s3transfer ==0.6.2
- six ==1.16.0
- snowballstemmer ==2.2.0
- soupsieve ==2.5
- sphinxcontrib-applehelp ==1.0.7
- sphinxcontrib-devhelp ==1.0.5
- sphinxcontrib-htmlhelp ==2.0.4
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-qthelp ==1.0.6
- sphinxcontrib-serializinghtml ==1.1.9
- typing_extensions ==4.7.1
- urllib3 ==1.26.18
- waitress ==2.1.2
- wcwidth ==0.2.6
- requests ==2.31.0
- requests_aws4auth *
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk.aws-amplify-alpha >=2.24.1a0,<3.0
- boto3 <2.0.0
- cdk-nag *
- constructs >=10.0.0
- git-remote-codecommit *
- ffmpeg-python ==0.2.0
- requests ==2.31.0
- scipy *
- soundfile *
- audio2numpy *
- matplotlib *
- ffmpeg-python ==0.2.0
- numpy *
- opencv-python-headless ==4.8.1.78
- opencv-python-headless ==4.8.1.78
- opencv-python-headless ==4.8.1.78
- scipy *
- opencv-python-headless ==4.8.1.78
- scipy *
- ffmpeg-python ==0.2.0
- ffmpeg-python ==0.2.0
- opencv-python-headless ==4.8.1.78
- scipy *
- ffmpeg-python ==0.2.0
- numpy *
- opencv-python-headless ==4.8.1.78
- aws-cdk-lib >=2.24.1,<3.0
- aws-cdk.aws_lambda_python_alpha *
- boto3 <2.0.0
- cdk_nag ==2.13.6
- constructs >=10.0.0
- requests *
- requests_aws4auth *
- urllib3 *
- aws-cdk-lib >=2.24.1,<3.0
- cdk-nag *
- chalice *
- boto3 <2.0.0
- chalice *
- urllib3 *
- aws-cdk-lib >=2.24.1,<3.0
- cdk-nag *
- chalice *
- boto3 <2.0.0
- chalice *
- jsonschema ==3.2.0
- aws-cdk-lib >=2.24.1,<3.0
- cdk-nag *
- boto3 ==1.26.54
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.11-x86_64 build
- public.ecr.aws/lambda/python 3.12 build
- @tanstack/eslint-plugin-query ^5.20.1 development
- @trivago/prettier-plugin-sort-imports ^4.3.0 development
- @types/node ^20.11.24 development
- @types/react ^18.2.56 development
- @types/react-dom ^18.2.19 development
- @types/react-lazy-load-image-component ^1.6.3 development
- @typescript-eslint/eslint-plugin ^7.0.2 development
- @typescript-eslint/parser ^7.0.2 development
- @vitejs/plugin-react ^4.2.1 development
- eslint ^8.56.0 development
- eslint-plugin-react-hooks ^4.6.0 development
- eslint-plugin-react-refresh ^0.4.5 development
- typescript ^5.2.2 development
- vite ^5.1.4 development
- @aws-amplify/ui-react ^6.1.5
- @fortawesome/fontawesome-svg-core ^6.5.1
- @fortawesome/free-brands-svg-icons ^6.5.1
- @fortawesome/free-regular-svg-icons ^6.5.1
- @fortawesome/free-solid-svg-icons ^6.5.1
- @fortawesome/react-fontawesome ^0.2.0
- @tanstack/react-query ^5.24.8
- @tanstack/react-query-devtools ^5.24.8
- animate.css ^4.1.1
- antd ^5.15.2
- aws-amplify ^6.0.18
- buffer ^6.0.3
- date-fns ^2.0.1
- date-fns-tz ^2.0.1
- hls.js ^1.5.11
- react ^18.2.0
- react-dom ^18.2.0
- react-error-boundary ^4.0.13
- react-lazy-load-image-component ^1.6.0
- react-player ^2.15.1
- react-router-dom ^6.22.2
- react-toastify ^10.0.4
- rodal ^2.1.0
- styled-components ^6.1.8
- uuid ^9.0.1
- 172 dependencies
- @aws-sdk/client-bedrock 3.727.0 development
- @aws-sdk/client-bedrock-runtime 3.726.1 development
- @aws-sdk/client-dynamodb 3.726.1 development
- @langchain/aws 0.0.2 development
- @langchain/community 0.2.19 development
- @langchain/core 0.2.16 development
- @opensearch-project/opensearch 2.10.0 development
- @aws-sdk/client-bedrock 3.727.0
- @aws-sdk/client-bedrock-runtime 3.726.1
- @aws-sdk/client-dynamodb 3.726.1
- @langchain/aws 0.0.2
- @langchain/community 0.2.19
- @langchain/core 0.2.16
- @opensearch-project/opensearch 2.10.0
- aws-cdk-lib >=2.24.1,<3.0
- cdk-nag ==2.28.159
- chalice *