This stack builds a setup to deploy a client side app on s3 with Cloudfront as a CDN and HTTPS using AWS Certificate Manager
๐ Before using the makefile, you need aws CLI
installed and configured (aws configure --profile bigoudi
) and an user-account on the AWS account of Bigoudi with enough permissions to run the update.
git clone [email protected]:NicolasRitouet/bigoudi.git
- change bigoudi with your own project name
- change bigou.di with your own domain name
- if you don't have one, create a new AWS account
- create a new profile for the
AWS cli
with your AWS account - modify params.json with your domain name and ARN certificate
make create-stack
The main goal of this stack is to be cost-efficient and easily scalable.
- s3 costs a few cents per month for less than 1Gb
- Cloudfront will be almost free with a limited traffic (if the traffic increases, you'll be hopefully glad to pay a few $ more)
- Route53 Hosted Zone (0.50$ per month)
- AWS Certificate manager creates SSL certificates for free and automatically renewd by AWS
In total, for a website with low traffic, the cost should be around 0.60$ per month.
This template will create a stack containing the following AWS resources:
- an S3 bucket for the logs
- an S3 bucket for the website
- a Cloudfront Distribution
- an hosted Zone for bigou.di
- a DNS record set for bigou.di
- a DNS record set for www.bigou.di
A second cloudformation stack ssl.yml
is available to create the SSL certificate.
It will create a wildcard certificate for bigou.di and bigoudi.com
This can be done manually or using this command:
AWS_REGION=us-east-1 STACK_NAME=ssl-bigoudi STACK_FILE_NAME=ssl make create
us-east-1
region to be associated with Cloudfront.
Once the SSL certificate has been created, copy paste the ARN in the params.json
file.
Use the following command to find the ARN:
AWS_REGION=us-east-1 STACK_NAME=ssl-bigoudi STACK_FILE_NAME=ssl make output
make create
make update
make output
make watch
make create-hangeset
make describe-changeset CHANGESET-NAME=name-of-changeset
make test
Feel free to send a PR.