GithubHelp home page GithubHelp logo

relivnd / virtual-waiting-room-on-aws Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-solutions/virtual-waiting-room-on-aws

0.0 0.0 0.0 14.96 MB

Virtual Waiting Room on AWS solution helps absorb and control incoming user requests to your website during an unusually large burst of traffic, usually due to a large-scale event.

License: Apache License 2.0

Shell 9.08% JavaScript 2.02% Python 62.32% HTML 4.81% Vue 21.73% Dockerfile 0.05%

virtual-waiting-room-on-aws's Introduction

๐Ÿš€ Solution Landing Page | ๐Ÿ“œ Solution Implementation Guide | ๐Ÿšง Feature request | ๐Ÿ› Bug Report

Note: If you want to use the solution without building from source, navigate to Solution Landing Page

Virtual Waiting Room on AWS

Site wrapper to absorb and control user traffic flowing into smaller web sites.

Prerequisites for Customization

  • Install/update to Python 3.x
  • Install the AWS Command Line Interface (CLI)
  • Create a Python virtual environment using requirements.txt and activate it
  • Configure the bucket name of your target Amazon S3 distribution bucket

Building distributable for customization

  • Configure the bucket name of your target Amazon S3 distribution bucket
export DIST_OUTPUT_BUCKET=<MY-BUCKET-NAME> # bucket where customized code will reside
export SOLUTION_NAME=my-solution-name
export VERSION=my-version # version number for the customized code

Note: You would have to create an S3 bucket with the prefix '-'; is where you are testing the customized solution. Also, the assets in bucket should be publicly accessible.

  • Now build the distributable:
cd deployment
chmod +x ./build-s3-dist.sh 
./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION 
  • Deploy the distributable to an Amazon S3 bucket in your account. The head-bucket command verifies that your account owns the bucket. Note: you must have the AWS Command Line Interface installed.
aws s3api head-bucket --bucket <MY-BUCKET-NAME>-<AWS-REGION> --expected-bucket-owner <AWS-ACCOUNT-ID>
aws s3 sync regional-s3-assets/ s3://<MY-BUCKET-NAME>-<AWS-REGION>/$SOLUTION_NAME/$VERSION/  
  • Get the link of the solution template uploaded to your Amazon S3 bucket.
  • Deploy the solution to your account by launching a new AWS CloudFormation stack using the link of the solution template in Amazon S3.

Running unit tests for customization

  • Some packages require a build before unit tests will run
  • Install the common package into the virtual envronment before running
cd ./deployment
chmod +x ./run-unit-tests.sh 
./run-unit-tests.sh 

File Structure

โ”œโ”€โ”€ deployment
โ”‚   โ”œโ”€โ”€ Dockerfile [ Used by docker_build script for building jwcrypto library ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-api-gateway-cw-logs-role.json   [ Base template for CloudWatch Logs role ] 
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-authorizers.json [ Base template for authorizers ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-getting-started.json [ Nested template for new users ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-openid.json    [ Base template for Open ID ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-sample-inlet-strategy.json   [ Base template for sample inlet strategy]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-sample.json    [ Base template for sample site ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-swagger-private-api.json   [ Swagger file for private API ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws-swagger-public-api.json    [ Swagger file for public API ]
โ”‚   โ”œโ”€โ”€ virtual-waiting-room-on-aws.json   [ Base template for core API ]
โ”‚   โ”œโ”€โ”€ build-s3-dist.sh    [ Script for building distributables and preparing the CloudFormation templates ]
โ”‚   โ”œโ”€โ”€ deploy.sh   [ Script for building distributables and preparing the CloudFormation templates ]
โ”‚   โ”œโ”€โ”€ docker_build.sh   [ Script for building jwcrypto library ]
โ”‚   โ”œโ”€โ”€ global-s3-assets  [ Directory for writing out CloudFormation during local build ]
โ”‚   โ”œโ”€โ”€ regional-s3-assets     [ Directory for writing out CloudFormation during local build ]
โ”‚   โ”œโ”€โ”€ requirements.txt    [ System requirements for local builds ]
โ”‚   โ””โ”€โ”€ run-unit-tests.sh   [ Script to run unit tests ]
โ”œโ”€โ”€ docs
โ”‚   โ”œโ”€โ”€ developer-guide.md    [ Waiting room developer guide ]
โ”‚   โ”œโ”€โ”€ install-guide.md      [ Waiting room installation guide ]
โ”‚   โ”œโ”€โ”€ physical-view.drawio
โ”‚   โ”œโ”€โ”€ physical-view.jpg
โ”‚   โ”œโ”€โ”€ sequence-diagrams.drawio
โ”‚   โ””โ”€โ”€ software-architecture.md
โ””โ”€โ”€ source
    โ”œโ”€โ”€ control-panel    [ Source files for sample control panel ]
    โ”œโ”€โ”€ core-api    [ Source files for core API ]
    โ”œโ”€โ”€ core-api-authorizers-sample   [ Source files Authorizers ]
    โ”œโ”€โ”€ openid-waitingroom    [ Source files for Open ID ]
    โ”œโ”€โ”€ sample-inlet-strategies   [ Source files for inlet strategies ]
    โ”œโ”€โ”€ sample-waiting-room-site   [ Source files for sample waiting room ]
    โ”œโ”€โ”€ shared    [ Source files for shared library ]
    โ”œโ”€โ”€ token-authorizer    [ Source files for token authorizer ]
    โ””โ”€โ”€ tools   [ Source files for tools and helper scripts ]

Collection of operational metrics

This solution collects anonymized operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the implementation guide.

External Contributors

@kght6123 for #232

License

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

virtual-waiting-room-on-aws's People

Contributors

jimtharioamazon avatar thyagram-aws avatar morjoan avatar bassemwanis avatar dependabot[bot] avatar imnotbrandon avatar amazon-auto avatar eggoynes avatar ihmaws avatar

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.