- Notifications
You must be signed in to change notification settings - Fork33
Live streaming on AWS with Amazon S3 automatically configures AWS Elemental MediaLive, Amazon S3 and Amazon CloudFront to ingest, encode, package and deliver a single source live stream through the AWS Cloud. The Solution provides 3 Encoding profiles to support 1080p through 288p HTTP live streaming (HLS) outputs.
License
aws-solutions/live-streaming-on-aws-with-amazon-s3
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Live streaming on AWS with Amazon S3 automatically configures AWS Elemental MediaLive, Amazon S3 and Amazon CloudFront to ingest, encode, package and deliver a single source live stream through the AWS Cloud. The Solution provides 3 Encoding profiles to support 1080p through 288p HTTP live streaming (HLS) outputs. For more details see thesolution home page.
The solution was developed using theAWS Cloud Development Kit and also leverages a AWS Solutions ConstructCloudFrontToS3
The solution supports RTP Push, RTMP push, HLS andAWS Elemental Link input types. For more detialed instructions see the implementation guide on thesolution home page.
- HD-1080p profile: 1920x1080, 1280x720, 960x540, 768x432, 640x360, 512x288
- HD-720p profile: 1280x720, 960x540, 768x432, 640x360, 512x288
- SD-540p profile: 960x540, 768x432, 640x360, 512x288
The solution can be deployed through the CloudFormation template available on thesolution home page.
- AWS Command Line Interface
- Node.js 12.x or later
- AWS CDK 1.102.0
The are 2 options for deploying the solution: using the CDK deployment tools or running the build script to generate a CFN template and the packaged lambda code.
This options simply flollows the standard CDK deployment process. You will need to runcdk bootstrap before you run cdk deply the first time to setup the cdk resource in your AWS account. Details on using the CDK can be found [here].
- Download or clone the repo and make the required changes to the source code.
- installl the dependecies for the lambda function and construct.
- then run
cdk deploy(first time use you will need to runcdk bootstrapfirst)
cd ./source/custom-resourcenpm install --productioncd ../constructsnpm install cdk bootstrap //if you havent already done so.cdk deployThe CloudFormation template (generated by the CDK) includes a lambda backed custom resource to configure MediaLive and create a UUID. To launch the solution the Lambda source code has to be deployed to an Amazon S3 bucket in the region you intend to deploy the solution.
Download or clone the repo and make the required changes to the source code.
Run unit tests to make sure added customization passes the tests:
cd ./deploymentchmod +x ./run-unit-tests.sh && ./run-unit-tests.shThe CloudFormation template is configured to pull the Lambda deployment packages from Amazon S3 bucket in the region the template is being launched in. Create a bucket in the desired region with the region name appended to the name of the bucket. eg: for us-east-1 create a bucket named:my-bucket-us-east-1
aws s3 mb s3://my-bucket-us-east-1Build the distributable:
chmod +x ./build-s3-dist.sh./build-s3-dist.sh <my-bucket> live-streaming-on-aws-with-amazon-s3 <version>Notes: Thebuild-s3-dist script expects the bucket name as one of its parameters. This value should not have the region suffix (remove the -us-east-1)
Ensure that you are owner of the AWS S3 bucket.
aws s3api head-bucket --bucket my-bucket-us-east-1 --expected-bucket-owner YOUR-AWS-ACCOUNT-NUMBERDeploy the distributable to the Amazon S3 bucket in your account:
aws s3 sync ./regional-s3-assets/ s3://my-bucket-us-east-1/live-streaming-on-aws-with-amazon-s3/<version>/ aws s3 sync ./global-s3-assets/ s3://my-bucket-us-east-1/live-streaming-on-aws-with-amazon-s3/<version>/- Get the link of the live-streaming-on-aws-with-amazon-s3.template uploaded to your Amazon S3 bucket.
- Deploy the solution.
When deploying this solution you may have a DevOps operator IAM user that deploys this CloudFormation template. The json file located at the following directory is the minimum IAM permissions that an AWS IAM user needs to be able to deploy the CloudFormation template successfully.
deployment/min_user_iam_deploy.json
- This project is licensed under the terms of the Apache 2.0 license. See
LICENSE.
This solution collects anonymized operational metrics to help AWS improve thequality of features of the solution. For more information, including how to disablethis capability, please see theimplementation guide.
About
Live streaming on AWS with Amazon S3 automatically configures AWS Elemental MediaLive, Amazon S3 and Amazon CloudFront to ingest, encode, package and deliver a single source live stream through the AWS Cloud. The Solution provides 3 Encoding profiles to support 1080p through 288p HTTP live streaming (HLS) outputs.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
