Custom Domain & SSL
Next, we need to configure the domain for the API Gateway we just created. We’ll proceed to create a custom domain and configure SSL for that domain using AWS Certificate Manager.
Create a Certificate
- Search for and access AWS Certificate Manager on the Console.
- Click Request a certificate.

- On the Request certificate screen:
- Select request a public certificate.
- Click Next.

- On the Request public certificate screen:
- Enter the domain name in the Fully qualified domain name field.
- In the Validation method section, select DNS validation.

- In the Key Algorithm section, choose RSA 2048.
- Click Next to complete the setup.

- On the Certificate detail screen:
- Click Create Records in Route 53.
- Once on the create records screen, click Create Records to initiate.
- Then, wait for the verification to turn green, indicating successful creation.

Create a Custom Domain
- On the API Gateway screen, select Custom Domain Names:

- On the Create domain name screen:
- Enter your domain name in the domain name field.
- Select the API endpoint type: Regional.
- In the ACM certificate section, choose the ACM you set up earlier.
- Click Create Domain Name.

- In the API Gateway Domain Name section, this will be the domain you configure in Route 53 to map your custom domain.

- On the Custom domain names screen:
- Select the domain you just created.
- Go to the API Mappings tab.
- Click Configure API Mappings.

- Select the API in the API field.
- Choose the stage you want to map, in this case, I’ll select the default stage.
- Click Save.

Map Domain Name
- Search for and access AWS Route 53.
- Go to Hosted Zones in the navigation bar.
- Select the Hosted Zone of your domain.

- On your domain’s hosted zone screen:

- On the Create Record screen:
- Enter your subdomain in the record name field.
- Choose CNAME as the Record Type.
- Enter the API Gateway Domain Name in the Value field.
- Click Create Records.

That’s it! Now, we can test if everything is working using cURL.

It seems everything is set up correctly. The setup is now complete.