Skip to content

snese/serverless-refarch-for-ga-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Serverless Reference Architecture for AWS Global Accelerator with Reverse Proxy

Reference Architecture

Amazon Interactive Video Service(IVS) is a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences. It provides ultra-low latency (< 5s) service for video streaming.

Currently, Amazon IVS is not supported in some regions. We implement a serverless solution to serve the users in unsupported regions. AWS Fargate with the auto-scaling group and Network Load Balancer (NLB) are used to host a reverse proxy for IVS playback URL. AWS Global Accelerator (AGA) is used to reduce network latency and robust network stability

To achieve the ultra-low latency, the Amazon IVS player and HTTPS playback URL is required and NLB with a TLS certificate provided by AWS Certificate Manager.

Why Reverse Proxy on AWS Fargate

AWS Fargate is a serverless compute service that helps container orchestration services such as Amazon ECS to provision containers without managing any EC2 instances. This repo aims to run Reverse Proxy in a serverless environment as a middle stack between AWS Global Accelerator and the endpoints you want to pass through the proxy.

Benefits for AWS Global Accelerator

AWS Global Accelerator is a service that improves the availability and performance of your applications with local or global users. It provides static IP addresses that act as a fixed entry point to your application endpoints in a single or multiple AWS Regions, such as the Network Load Balancers (NLB) we used in this reference.

Example: AGA Multiples Regions Endpoint Example

How to deploy

Prerequisites

Set up CDK Enviorment:


# 1. Install CDK Toolkit
npm install -g aws-cdk

# 2. Clone the Repository
git clone https://github.com/snese/serverless-refarch-for-ga-proxy

# 3. Install required modules
cd serverless-refarch-for-ga-proxy
cd cdk-typescript
npm install

# 4. Bootstrapping an environment (If it is your first time to deploy AWS CDK App in the Region)
cdk bootstrap


Deployment:

# Estimated deployment time: 5 min

# 1. Create a custom configuration of Nginx 
node ./lib/create-conf.js <your-proxy-url>


# 2. Deploy your CDK App
cdk deploy "*"

License Summary

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

About

AWS Serverless Reference Architecture for GA with Proxy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages