> For the complete documentation index, see [llms.txt](https://awsinpractice.itassist.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://awsinpractice.itassist.com/study-group/aws-certified-solutions-architect-associate/domain-1-design-secure-architectures/task-statement-1.2-design-secure-workloads-and-applications/use-cases/configuring-a-custom-domain-name-for-api-gateway-with-aws-certificate-manager-and-route-53.md).

# Configuring a Custom Domain Name for API Gateway with AWS Certificate Manager and Route 53

SecureCart, an **e-commerce platform**, is deploying a **REST API** to support: ✅ **Customer orders**\
✅ **Product catalog access**\
✅ **Checkout processing**

The SecureCart engineering team wants to ensure that all **API communications** are **secure and user-friendly**, using a **custom domain** and **SSL/TLS encryption**.

***

### **🔹 SecureCart API Security Requirements**

* **HTTPS enforcement** → API traffic must be **encrypted** using an **SSL/TLS certificate**.
* **Branded API domain** → SecureCart wants to use `api.securecart.com` instead of AWS’s default API Gateway URL.
* **Scalability** → The solution must support **millions of API requests per day** with **minimal latency**.
* **DNS Management** → The API must be **discoverable and accessible** through **Amazon Route 53**.

***

### **🔹 Step-by-Step SecureCart Implementation**

#### **1️⃣ Request a Public SSL/TLS Certificate in AWS Certificate Manager (ACM)**

SecureCart requests a **public certificate** for `api.securecart.com` to **enable HTTPS**.

**✅ Steps**

1. Navigate to **AWS Certificate Manager (ACM)**.
2. Click **Request a Certificate** → **Request a Public Certificate**.
3. Enter **Domain Name** → `api.securecart.com`.
4. Choose **DNS Validation** (Recommended).
5. Click **Request** and validate by adding the **CNAME record** in **Route 53**.
6. Once validated, the certificate status updates to **"Issued"**.

**🔹 Why is ACM used?**

✔ **Free certificate management** – No manual renewal required.\
✔ **Seamless integration** – Works natively with API Gateway.

***

#### **2️⃣ Associate SSL Certificate with API Gateway**

SecureCart configures **Amazon API Gateway** to use `api.securecart.com` as its **custom domain**.

**✅ Steps**

1. Navigate to **API Gateway** → **Custom Domain Names**.
2. Click **Create** → Enter **`api.securecart.com`**.
3. Select **Endpoint Configuration**:
   * **Regional** (used in this case)
   * **Edge-Optimized** (for better global performance)
4. Choose **ACM Certificate** issued for `api.securecart.com`.
5. Click **Create**.

**🔹 Why configure API Gateway with a custom domain?**

✔ **Branding & consistency** → Uses `api.securecart.com` instead of `xyz.execute-api.amazonaws.com`.\
✔ **Secure API traffic** → Ensures **TLS-encrypted communication**.

***

#### **3️⃣ Create Route 53 Alias Record for SecureCart API**

SecureCart uses **Amazon Route 53** to route traffic to the **API Gateway domain**.

**✅ Steps**

1. Navigate to **Amazon Route 53** → **Hosted Zones**.
2. Select `securecart.com`.
3. Click **Create Record**:
   * **Record Name:** `api.securecart.com`
   * **Type:** A (Alias)
   * **Alias Target:** Select the **API Gateway regional domain name**.
4. Click **Create Record**.

**🔹 Why use Route 53 Alias Records?**

✔ **Eliminates manual IP management** – Automatically maps to API Gateway.\
✔ **Optimized latency** – Route 53 efficiently directs users to the nearest endpoint.

***

### **🔹 SecureCart Security Enhancements**

To further **secure API Gateway**, SecureCart implements: ✔ **AWS WAF (Web Application Firewall)** – To **prevent SQL injection & DDoS attacks**.\
✔ **IAM Authorization** – Restricts API access using **IAM roles & policies**.\
✔ **API Gateway Throttling** – Protects against **abuse & excessive requests**.\
✔ **CloudTrail Logging** – Monitors API activity for **security auditing**.

***

### **🚀 Summary**

✔ SecureCart configures **API Gateway with a custom domain** (`api.securecart.com`).\
✔ Uses **AWS Certificate Manager (ACM)** to **enable HTTPS**.\
✔ **Amazon Route 53** routes traffic securely to **API Gateway**.\
✔ Enhances security with **AWS WAF, IAM Policies, and API throttling**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://awsinpractice.itassist.com/study-group/aws-certified-solutions-architect-associate/domain-1-design-secure-architectures/task-statement-1.2-design-secure-workloads-and-applications/use-cases/configuring-a-custom-domain-name-for-api-gateway-with-aws-certificate-manager-and-route-53.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
