shouldautomate.it
Distribute
npm install
grunt
Install
Host on S3
-
Setup static page on S3
-
Properties -> Static website hosting
-
Bucket policy
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::shouldiautomate.it/*" ] } ] }
-
Deploy user policy
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": ["arn:aws:s3:::shouldiautomate.it"] }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetObjectAcl", "s3:PutObject", "s3:PutObjectAcl", "s3:DeleteObject" ], "Resource": ["arn:aws:s3:::shouldiautomate.it/*"] } ] }
-
Host on Cloudfront
-
CloudFront as CDN inkl. TLS, 2, 3, 4
-
Provision certificate
- Switch region "N. Virgina"
- Open Amazon Certificate Manager (ACM)
- Request a certificate (from Amazon for free - similar to Lets encrypt)
- Validate certificate (eg. using CNAME)
-
Create new distribution
- Select "Web"
- Point origin to
http://BUCKET_NAME.s3-website-REGION_NAME.amazonaws.com
and not the bucket directly! (See 1, 2) - Redirect HTTP to HTTPS
- Allow GET, HEAD
- Object Caching Customize + Max and Default TTL 1800 (aka 30 min)
- Compress Objects Automatically
- Price Class "Use Only U.S...." (Cheapest)
- Alternate Domain Names (CNAMEs) -> Enter your naked domain aka
shouldiautomate.it
- Custom SSL certificate from ACM dropdown
- Only Clients .. SNI
- TLSv1.1
- HTTP/2 support
- Default Root Object
index.html
- Create and wait...
- Select distribution and Error Pages tab add link to your error page
-
Hint: If you want to protect your origin and use OAI you can still redirect to subpages uses Lambdas see this.
-
Content
Improve SEO
- Search Engine Optimization Starter Guide from Google
- Receive emails via SES