When you create a project with AWS services, you can use a custom domain to the API to the AWS Cloud by configuring Route 53. I will walk you through this process step by step.
Infographic: Journey to the Clouds | Data Driven Investor
Smart business leaders understand the value of utilizing the cloud. As data storage needs grow, as they have been…
use the serverless framework in the serverless.yml file in your project. It requires a new plug-in called, “serverless-domain-manager.” You can install this in your console:
npm install — save-dev serverless-domain-manager
This plug-in is going to help us map a custom domain to our API deployed on AWS.
We must reference it in the plug-in section of our serverless template.
In the custom section,
We’ll add a new property called, “custom domain,” and under that, we have to provide a domain name we want to use
- In the next line, we must add basePath: something comes after your domain name from your API service such as API-Gateway
- We also have to specify the stage.
- Then, specify a certificateName. (we have to use SSL certificate with our custom domain. We can get our free SSL certificate from AWS. I’m gonna show you that in a later post.)
- W have to create Route 53 Record and set it as “true”. (Implementing this can automatically create necessary Route53 record for us.)
Here’s your codebase ready to implement your custom domain! In the next session, I will bring how to configure Route 53 and add SSL certificate to the Custom Domain using ACM.