Giter VIP home page Giter VIP logo

twitch-extension-ebs-aws-tutorial's Introduction

Twitch-Extension-EBS-Tutorial

Tutorial for using AWS API Gateway and Lambda as a severless EBS for Twitch's Hello World and Animal Facts sample extensions.

About

Not all extensions need an EBS, especially now that Twitch offer a configuration service to handle extension configuration, but for extensions that do require an EBS it can be a noticible cost to run and maintain a server. While a VPS or dedicated servers do have their uses, a large number of extensions on Twitch can benefit from a serverless setup which will only incur charges when used, rather than constantly cost money even when idle such as when no stream is currently live with your extension. These services can also easily scale with the useage of the extension to be account for spikes in demand and periods of low activity.

This tutorial aims to show how AWS can be used to as an EBS for the Twitch extension tutorials, and also point out some of the added complexities due to Lambda being stateless compared to the EBS servers provided in the sample extensions themselves. This is not intended as a complete guide to the services used in this tutorial, as different extensions will have different needs and to cover the services in depth would be beyond the scope of this tutorial, instead I hope this tutorial will provide a starting point for using a serverless infrastructure as an cost effective EBS.

For this tutorial I'll be using Amazon Web Services (AWS) for the backend:

  • DynamoDB - Database to store extension state for each channel.
  • IAM - Access rights management between services.
  • Lambda - Run Node.js/Go functions to act as a backend for the extensions.
  • API Gateway - Web accessible endpoint for the extension's frontend to send requests to.

Getting Started

This guide assumes you already have an AWS account, if not please sign up at https://aws.amazon.com/

Documentation

  1. Hello World

    1. Creating a DynamodDB Table
    2. Creating an IAM role
    3. Query Colour Function
    4. Cycle Colour Function
    5. API Gateway Routes
  2. Animal Facts

    1. Random Fact Function
    2. API Gateway Routes
  3. What's Next?

Author

If you need to get in touch either message me here on GitHub, on Twtich's Dev forums, or on the TwitchDev server in the Twitch app. If you liked this tutorial I'd appreciate anyone who wants to follow me on Twitch using my channel link above. I plan to write more tutorials on different subjects as I try new things, some of which I plan to stream in the future too!

Special Thanks

Special thanks go to the original developers and contriutors of the Hello World and Animal Facts sample extensions from which the EBS code in this tutorial is a derivitive work of.

License

This project is licensed under the Apache 2.0 - see the LICENSE file for details

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.