of our Rails app. • The Rails application was located in Chicago. • Users from around the world had to reach Chicago in order to get the application. • We had to deploy Rails every time we wanted to make a change to our React application.
• Based on the webpack configuration we use. • Includes modern techniques like lazy-loading and client- side routing. • Notable differences: smaller, not TypeScript.
at getting a single-page application: • Hosted on AWS. • Distributed globally. • Secured with SSL. • Automatically deployed with CI/CD. • Dynamically responding to requests.
course is focused on the high-performance distribution of your client-side, JavaScript application. • Serverless. Scott Moss has an amazing workshop that came out recently and you should totally go watch it—after this one, of course.
your buckets. • You can put objects (read: files) in your buckets. • You can read from your buckets as well. • You can host web pages out of your buckets.
immediate. You’ll get back a 200 response. • Updating and removing objects is eventually consistent. Users might get an old version. (This has literally never happened to me.)
to purchase a domain name, you’ll skip a few steps as we go along, but you’ll be able to come along. • We’re going to register a domain name now so that we know we have one that’s unique. • Also: registration takes some time, so—let’s get it started now.
to purchase a domain name, you’ll skip a few steps as we go along, but you’ll be able to come along. • Register a domain name now so that we know we have one that’s unique. • Also: registration takes some time, so—let’s get it started now.
• We’re going to set a policy on the bucket. • We’re going to configure the S3 bucket for static website hosting. • We’re going to upload a simple React application via the command line.
just not secure.) • Doing this manually can get tedious. • It’s hosted in Virginia. (No offense to Virginia.) • Routing is still kind of breaking the web.
my co-worker, Steven, likes to say CloudFront puts the “eventual” in eventual consistency. • Everything in CloudFront takes a while, so we’re going to just set it up now and then we’ll talk about it while it’s cooking.
• We’re going to point it to our static website on S3. • We’ll add our domain names. • We’ll set up gzipping for our assets. • We’ll set a default root object.
• Doing this manually can get tedious. • It’s hosting in Virginia. (No offense to Virginia, but it’s no New Jersey.) • Yea, routing is still weird. ¯\_(ツ)_/¯
free for public repositories and easy to set up. • You can do this with any CI tool. (We used to do it with Jenkins at SendGrid, now we use Buildkite.)
on CloudFront. • You can do this with a relatively low TTL on the cache header or you can do this with invalidations. • You get up 1,000 invalidations per month for free. • You can have your CI/CD tool take care of all of this when merging to master.
request is forwarded to the origin. • You can make external network calls. • Dynamically set an origin based on the headers. • Re-write URLs (pretty URLs). • Cool for stuff like internationalization.
cached yet. • Executed on cache miss, after a response is received from the origin. • Make external network calls. • Modify response headers prior to caching.
differ slightly. • But, there is probably a solution using AWS. • Some of this grunt work can be further automated via tools like Terraform or CloudFormation, but there is a cost/ benefit analysis that needs to happen there.