To make the most of this tutorial series, create a Serverless Framework PRO account for free
In this video, we'll look at how you can register a custom domain using Route 53.
In this section, we'll be looking at how we can set up a bunch of different details to improve the usability, security, and overall performance of our website. We'll start by getting a custom domain and we'll see how we could do this process inside of Amazon Route 53 then we'll look at how we could request an SSL certificate to set up HTTPS for our website.
After that, we'll look at creating and configuring a CloudFront distribution in order to help deliver files more rapidly to our end users. And finally, we'll look at how we could redeploy our site and when we need to invalidate the cache of the CloudFront distribution for all the files inside of our S3 bucket. So let's go ahead and get started. I've gone ahead and loaded up the AWS account that we've been interacting with thus far. If we actually go into S3 we can find the bucket that we've previously been using to host our site.
I know I have a lot of different buckets here, but if I find this one that I was using previously, you'll see that I have this index.html file here. And if I go over to the property section, you'll see that we have static website hosting set up and if we navigate to this link, it's the same website we just deployed earlier. You also see that we have some permissions so that this bucket has public access to people who want to view the website files.
But what do we do next to get this website a custom domain? Well, that step looks like going to Route 53 so if we go over and enter route 53 into the search bar here, you'll find that AWS has a service that allows us to register domains. Your initial landing page might look a little different from this depending on if you've already registered a domain, but either way you should be able to go through to the section that allows you to look for different domain names.
So if I wanted to register a site for Fernando Medina Corey, I could just go in here, type that in and click check for the domain. Now it looks like this is available so I could complete the process just by adding to this to my cart and clicking continue.
I'm not actually going to register this domain because it will require me to show some personal contact information and to go through a little bit of time checking my email and clicking some verification links. But once you're done with this process, you can go back to the Route 53 console and go over to the hosted zone section. When you finish registering a domain, it should appear here underneath the hosted zone section and you can click into it and see the different DNS records that are automatically created for you by AWS. You don't need to change anything here quite yet, and we'll actually revisit this after we've taken a few other steps later on.
In the next video, let's see how we can request an SSL certificate for our domain name.