This repository contains the full source code that is used in the blog post Create a serverless Live-to-VOD workflow with AWS Elemental.
- An AWS account
- Installed and authenticated AWS CLI (authenticate with an IAM user or an AWS STS Security Token)
- AWS Serverless Application Model (AWS SAM)
- You have completed steps 1-3 of the AWS Live Streaming and Live-to-VOD Workshop or already have an AWS Elemental MediaPackage live endpoint you want to extract clips from. You can check your existing endpoints using the following CLI command.
aws mediapackage list-origin-endpoints
git clone git@github.com:aws-samples/live-to-vod-workflow-using-aws-serverless-platform
sam.yml
describes the AWS resources that make up your workflow.handler.py
contains the Python code for our Lambda functions.create_packaging_group.py
is a convenience script to create a packaging group.
aws s3 mb s3://<YOUR_BUCKET>
python create_packaging_group.py <THE_ID_FOR_YOUR_PACKAGING_GROUP> <THE_ID_FOR_YOUR_PACKAGING_CONFIG>
i.e.
python create_packaging_group.py MyPackagingGroupForVOD MyPackagingConfigForVODInHLS
sam package --template-file ./sam.yml --s3-bucket <YOUR_BUCKET> --output-template-file ./packaged.yml
sam deploy --template-file packaged.yml --stack-name ServerlessLiveToVOD --capabilities CAPABILITY_NAMED_IAM --parameter-overrides ClipsOriginEndpointId=YOUR_ORIGIN_ID PackagingGroupId=YOUR_PACKAGING_GROUP_ID
If you are unsure about the values for ClipsOriginEndpointId
and PackagingGroupId
you can check the AWS console or use the following CLI commands
aws mediapackage list-origin-endpoints --query "OriginEndpoints[*].[Id]" --output table
aws mediapackage-vod list-packaging-groups --query "PackagingGroups[*].Id" --output table
After the deployment has been successful, SAM will output a parameter API endpoint URL
. The value should look similar to this: https://abcde.execute-api.eu-central-1.amazonaws.com/prod/
- this is your API endpoint, which you can now use to create clips from your live stream and query your clip database.
When you are done, make sure to clean everything up. Run the following command to shut down the resources created in this workshop.
aws cloudformation delete-stack --stack ServerlessLiveToVOD
If you used the AWS Live Streaming and Live-to-VOD Workshop please follow the instructions to clean up the AWS Elemental resources if no longer needed.
This library is licensed under the MIT-0 License. See the LICENSE file.