deploying-custom-domain-rest-api

Deploys a Regional API Gateway REST API with custom domain, Lambda backend, and request authorizer.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill deploying-custom-domain-rest-api-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploying-custom-domain-rest-api
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/deploying-custom-domain-rest-api
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill deploying-custom-domain-rest-api-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Setting up a production-style REST API on AWS with a custom domain involves many error-prone manual steps across ACM, IAM, Lambda, API Gateway, and Route 53. This Skill automates the entire deployment workflow using AWS CLI commands, ensuring each resource is created, wired together, and validated in the correct order. ## Core Features & Use Cases - End-to-End API Deployment: Provisions an ACM certificate, IAM roles, two Lambda functions (request authorizer and backend), a Regional REST API, custom domain with TLS 1.2, base path mapping, and a Route 53 A-alias record. - Request-Based Authorization: Deploys a Lambda authorizer that validates headers, query string parameters, and stage variables before allowing access to the GET /example endpoint. - Built-In Validation: Includes a validation script that checks DNS propagation, API Gateway configuration, Lambda function state, and performs a live authenticated curl test. - Use Case: A developer needs to expose an internal service at api.example.com with header-based access control. Provide the domain name, region, and hosted zone ID, and the Skill deploys the full stack and returns a working curl test command. ## Quick Start Deploy a Regional REST API with a Lambda backend and request authorizer at custom domain api.example.com in us-east-2 using hosted zone Z2OJLYMUO9EFXC.

Frequently Asked Questions about deploying-custom-domain-rest-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy an API Gateway REST API with a custom domain using AWS CLI?

Create the REST API with a REGIONAL endpoint type, request an ACM certificate in the same region, create the custom domain with the regional certificate ARN, add a base path mapping to your stage, and create a Route 53 A-alias record pointing to the regional domain name.

How do I set up a request-based Lambda authorizer for API Gateway?

Create a Lambda function that inspects headers, query string parameters, and stage variables, then register it with aws apigateway create-authorizer using type REQUEST and an identity source listing the request parameters. Grant API Gateway invoke permission on the authorizer function.

Does this deployment support private API Gateway endpoints?

No, this workflow covers Regional endpoints only. Private endpoints require VPC endpoint configuration, which is not included. If you need a private API, you must configure an interface VPC endpoint separately.

Why is my ACM certificate stuck in PENDING_VALIDATION?

The DNS validation CNAME record may be missing or created in the wrong hosted zone. Check the validation record with aws acm describe-certificate and confirm the CNAME exists in Route 53, then retry the aws acm wait certificate-validated command.

Why does my API return 403 Forbidden after deployment?

The request authorizer requires HeaderAuth1 to equal headerValue1, QueryString1 to equal queryValue1, and stage variable StageVar1 to equal stageValue1. Verify all three values and check the authorizer function's CloudWatch Logs for details.

Are the hardcoded authorizer values safe for production?

No, the demo values headerValue1, queryValue1, and stageValue1 are not suitable for production. Replace them with credentials managed through AWS Secrets Manager or Systems Manager Parameter Store before deploying to production.