3 ms·
Show HN: A collection of shell/Terraform scripts to host a web site on AWS
Regularly register a domain and want to put some web content there?
This repo includes:
A shell script that:
* Adds a hosted zone in Route53 for your domain
* Prints the NS records for your domain so you can update your registrar
AND
A Terraform module that does the following:
* Creates an S3 bucket (domainname)
* Creates a second S3 bucket for logs (domainname-logs) with a lifecycle policy to delete logs after 15 days
* Creates a CloudFront distribution
* Creates an SSL certificate for the domain name (adding www. as a subject alternative name)
* Creates a Route53 record for the domain name (adding www. as a CNAME)
* Creates an IAM user & policy for a github action. Warning: Check the permissions, they are too liberal right now :).
* (optional) Creates Route53 MX records and TXT validation record for Google Workspace
AND
A shell script that:
* Adds AWS credentials to your github repo secrets so you can use a github action to deploy your website to the bucket (using something like Jekyll).