Giter Site home page Giter Site logo

aws-samples / amazon-ivs-multi-host-serverless-demo Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 1.0 606 KB

A demo that shows how to implement a serverless nodejs application that supports a collaborative live streaming, or multi-host experience using Amazon IVS.

Home Page: https://IVS.rocks

JavaScript 15.48% TypeScript 84.52%
aws aws-cdk aws-cdk-typescript aws-cloudformation aws-ivs aws-lambda aws-lambda-node lambda live-streaming nodejs

amazon-ivs-multi-host-serverless-demo's Introduction

Amazon IVS Multi-host Serverless Demo

This readme includes instructions for deploying the Amazon IVS Multi-host Serverless Demo to an AWS Account. This serverless application supports the following Amazon IVS demos:

*IMPORTANT NOTE: Deploying this demo application in your AWS account will create and consume AWS resources, which will cost money.*

Application overview

A diagram showing the architecture of the application.

A full description of the diagram is available in the architecture description.

Prerequisites

  • AWS CLI Version 2
  • NodeJS and npm (npm is usually installed with NodeJS).
    • If you have node version manager installed, run nvm use to sync your node version with this project.
  • Access to an AWS Account with at least the following permissions:
    • Create IAM roles
    • Create Lambda Functions
    • Create Amazon IVS Channels, Stages, and Chat rooms
    • Create Amazon S3 Buckets
    • Create Amazon DynamoDB Tables

Configure the AWS CLI

Before you start, run the following command to make sure you're in the correct AWS account (or configure as needed):

aws configure

For configuration specifics, refer to the AWS CLI User Guide

Run this app locally

To run the app locally, first install the AWS SAM CLI and Docker. With AWS SAM CLI installed and Docker running on your machine, take the following steps:

  1. Install the required packages: npm install
  2. Bootstrap the required resources: npm run bootstrap
  3. Run the application: sam local start-api -t ./cdk.out/AmazonIVSMultiHostServerlessStack.template.json

Deploy this app to AWS

With NodeJS and NPM installed, take the following steps:

  1. Install the required packages: npm install
  2. Bootstrap the required resources: npm run bootstrap
  3. Run the application: npm run deploy

Use your deployed backend in the client applications

When the deployment successfully completes, copy the URL provided in the Outputs of the script. The URL will be similar to the following format:

https://<ID>.execute-api.<REGION>.amazonaws.com/prod/

This URL can be used to run the following demo applications:

Accessing the deployed application

If needed, you can retrieve the Cloudformation stack outputs by running the following command:

aws cloudformation describe-stacks --stack-name AmazonIVSMultiHostServerlessStack \
--query 'Stacks[].Outputs'

Cleanup

To delete all resources associated with this demo, including the DynamoDB table! run the following command:

npm run destroy

This command may not delete all associated Amazon IVS stages, channels, or chat rooms. Visit the Amazon IVS web console to delete any lingering resources.

Known issues

  • In some instances, the Amazon IVS stage, channel, or room may fail to delete. To remove resources manually, look for resources tagged with the key AmazonIVSDemoResource and value AmazonIVSMultiHostResource.

amazon-ivs-multi-host-serverless-demo's People

Contributors

amazon-auto avatar dependabot[bot] avatar slee-aws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sittipongwork

amazon-ivs-multi-host-serverless-demo's Issues

React UI

Is there any React UI to test this demo.

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.