Adding a Custom Domain to the API to the AWS Cloud

Hyoeun Lee
Feb 18 · 2 min read

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.

First,

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.

Second,

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

ex) xyz.com

ex) ${self.provider.stage}

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.

Data Driven Investor

from confusion to clarity not insanity

Hyoeun Lee

Written by

Full-stack web and mobile developer

Data Driven Investor

from confusion to clarity not insanity

More From Medium

More from Data Driven Investor

More from Data Driven Investor

More from Data Driven Investor

More from Data Driven Investor

PowerPoint: The Most Underrated Diagram Tool

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade