Skip to content

Easily create production ready AWS environments for hosting static files

Notifications You must be signed in to change notification settings

Marcel-G/aws-static-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS static environment

Easily create production ready AWS environments for hosting static files.

Using CloudFormation, the following resources are created for the stack:

  • LogBucket - S3 bucket for storing bucket & CDN logs
  • RootBucket - S3 bucket to store website files
  • RedirectBucket & RedirectDistribution - for redirecting traffic from *.domain.com to the root domain.
  • WebsiteCDN - Main CloudFront distribution
  • StackUser & DeploymentKey - A user is created for the stack and a key is created to use for deployments

AWS CloudFormation Stack Diagram

How to use

Prerequisite

Running with npm

Add the following scripts to package.json

...
"scripts": {
    "aws:create-stack": "./aws-static-environment/create-stack.sh",
    "aws:stack-info": "./aws-static-environment/stack-info.sh",
    ...

Create a new environment:

npm run aws:create-stack -- <domain> <environment>

Get the stack info

npm run aws:stack-info -- <environment>

Without npm

The project name should also be provided when not running with npm.

./aws-static-environment/create-stack.sh <domain> <environment> <project name>
./aws-static-environment/stack-info.sh <environment> <project name>

About

Easily create production ready AWS environments for hosting static files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages