Open peterbe opened 5 years ago
We probably don't need answers to every question in...
...but it would be nice to have the framework in place to control some of those things with click
args or with environment variables. For example, if the branch is master
you might "Price Class = Use All Edge Locations".
Wanna put together something for this one @escattone ?
We should probably never expose the fact that it's S3 + CloudFront behind the scenes. So, as a requirement, we should have a dedicated domain name for all stage deploys. I.e. we should never say "To test your deployed staging site go to https://a14tmhy55pxc8p.cloudfront.net/"
Instead it should be something like "To test your deployed staging site go to https://{SUBDOMAIN}.stumptown.io/" where, if possible, {SUBDOMAIN}
is the friendly name of the S3 bucket.
Eventually, if all goes according to plan, one CloudFront exception should be developer.mozilla.org
.
By the way, this blog post seems handy: https://100awsprojects.com/post/2018-01-27-s3-website-using-cf--route-53-and-python-scripts/
I had 2 S3 buckets uploaded and prepared. I want to see how they behave side-by-side when fully configured. So I manually created a CF distribution for each bucket using the AWS console. When they were direct URLs to the S3 buckets the names are super helpful:
However, the URLs you get with CloudFront, by default, completely masks this and now the two URLs are:
I think what I'm trying to say is that it's a critical feature, before we unleash this outside the core team, that we figure out the CNAME stuff.
I don't care that much about the top-level domain but what I'd like to see is something like:
https://peterbe-lazy-load-bcd-tables.stumptown.io/en-US/docs/Web/HTML/Element/video
That's a URL I'd be proud to show my mom.
Before I forget! One important thing about making CloudFront distributions is the origin. If you simply pick an S3 bucket instead of typing out the S3 bucket's own domain, all S3 bucket's routing rules are lost. For example:
stumptown-peterbe-sidebar-html.s3-website-us-west-1.amazonaws.com
. Now it will return the content of foo/bar/index.html
if I simple go to <cloudfrontdomain>/foo/bar/
Totally cryptic but good to keep in mind.
After all the files have been uploaded to S3, the next thing is to get or create a CloudFront distribution. The goal is to get the domain out.