后端与数据库

deploying-custom-domain-rest-api

aws/agent-toolk…-for-aws

Deploys a Regional REST API with a custom domain name, a Lambda backend function, and a request-based Lambda authorizer using AWS CLI. Covers ACM certificate provisioning, API Gateway REST API creation, Lambda function deployment, request authorizer setup, custom domain configuration, base path mapping, and Route 53 DNS record creation. Trigger keywords: custom domain, REST API, Lambda, Route 53, API Gateway, regional endpoint, request authorizer, base path mapping.

  • 5184 次安装
  • 3300 星标
  • 收录于

安装命令

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill deploying-custom-domain-rest-api

SKILL.md

Custom Domain REST API with Lambda and Request Authorizer

Overview

This SOP deploys a REST API with a Regional custom domain name, a Lambda backend function, and a request-based Lambda authorizer. It handles ACM certificate provisioning, IAM role creation, Lambda function deployment, API Gateway REST API creation with a custom authorizer, custom domain configuration, base path mapping, and Route 53 DNS setup.

The architecture includes:

  • An API Gateway REST API with an endpoint type of REGIONAL
  • A request-based Lambda authorizer that validates headers, query string parameters, and stage variables
  • A Lambda backend function at GET /example
  • A custom domain name with TLS 1.2
  • A base path mapping connecting the custom domain to the API stage
  • A Route 53 A-alias record pointing the custom domain to the API Gateway Regional endpoint

Important: This SOP uses Regional endpoints. If the user requests a private endpoint, inform them that this skill covers Regional endpoints only. Private endpoints require VPC endpoint configuration.

Parameters