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.cominstead 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
Navigate to AWS Certificate Manager (ACM).
Click Request a Certificate β Request a Public Certificate.
Enter Domain Name β
api.securecart.com.Choose DNS Validation (Recommended).
Click Request and validate by adding the CNAME record in Route 53.
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
Navigate to API Gateway β Custom Domain Names.
Click Create β Enter
api.securecart.com.Select Endpoint Configuration:
Regional (used in this case)
Edge-Optimized (for better global performance)
Choose ACM Certificate issued for
api.securecart.com.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
Navigate to Amazon Route 53 β Hosted Zones.
Select
securecart.com.Click Create Record:
Record Name:
api.securecart.comType: A (Alias)
Alias Target: Select the API Gateway regional domain name.
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.
Last updated