k1LoW / serverless-static-hosting-with-basic-auth

Serverless boilerplate for Static website hosting with Basic authentication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serverless boilerplate for Static website hosting with Basic authentication Build Status

Architecture

[CloudFront (with Lambda@Edge)] -Restrict Bucket Access-> [S3 Origin Bucket] <-Sync- [Local src/*]

Using plugin

Usage

Install boilerplate

$ git clone https://github.com/k1LoW/serverless-static-hosting-with-basic-auth.git ./my-static-page

Set Basic authentication USERNAME:PASS

Set Basic authentication config ( handler.js )

Deploy stack

$ npm install
$ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run deploy

Synchronize src/* -> Website

$ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run sync

Remove stack

$ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run remove

About

Serverless boilerplate for Static website hosting with Basic authentication


Languages

Language:JavaScript 99.1%Language:HTML 0.9%