Static Website Hosting with AWS
I host this website with AWS. It is a static website which I generate with a Gradle build.
This is the architecture diagram:
S3
I have two Amazon S3 buckets. One for the code (HTML, CSS...) and another bucket for the media (Images, Videos...)
AWS Certificate Manager
I created a certificate for the domain name with
AWS Certificate Manager. The certificate covers the domain apex sergiodelamo.com
and the wildcard *.sergiodelamo.com
CloudFront
I have two Amazon CloudFront distributions distributing the content of each bucket. One distribution for the code bucket sergiodelamo.com
and another one for the media images.sergiodelamo.com
. Both distributions use the certificate. One distribution uses the domain sergiodelamo.com
, the other the domain images.sergiodelamo.com
.
Route53
I manage the website domain name at Hover. I delegate DNS to Amazon Route53. In Route53, I have two DNS Records A which are alias to the CloudFront distributions.
Such an architecture is simpler than it looks like to create. I am really happy with it.