Giter Site home page Giter Site logo

live-to-vod-workflow-using-aws-serverless-platform's Introduction

Creating a Live-to-VOD workflow using AWS Elemental Services and the AWS serverless platform

This repository contains the full source code that is used in the blog post Create a serverless Live-to-VOD workflow with AWS Elemental.

Solution Overview

Diagram

Prerequisites

aws mediapackage list-origin-endpoints

Let’s get you started

1. Make sure you completed the prerequisites above and git pulled this repo.

git clone [email protected]:aws-samples/live-to-vod-workflow-using-aws-serverless-platform

2. Open the repository in your preferred IDE and familiarize yourself with the code.

  • 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.

3. Create a deployment bucket for our code on S3.

aws s3 mb s3://<YOUR_BUCKET>

4. Create a packing group and note the PACKAGING_GROUP_ID

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

5. Create a SAM package of your application for deployment

sam package --template-file ./sam.yml --s3-bucket <YOUR_BUCKET>  --output-template-file ./packaged.yml

6. Deploy your application

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

List Origin Enpoints
aws mediapackage list-origin-endpoints --query "OriginEndpoints[*].[Id]" --output table
List Packaging Groups
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.

Cleaning up

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.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.