$npx -y skills add awslabs/agent-plugins --skill api-gatewayBuild, manage, and operate APIs with Amazon API Gateway (REST, HTTP, and WebSocket). Triggers on phrases like: API Gateway, REST API, HTTP API, WebSocket API, custom domain, Lambda authorizer, usage plan, throttling, CORS, VPC link, private API. Also covers troubleshooting API Ga
| 1 | # Amazon API Gateway Development |
| 2 | |
| 3 | Expert guidance for building, managing, governing, and operating APIs with Amazon API Gateway. Covers REST APIs (v1), HTTP APIs (v2), and WebSocket APIs. |
| 4 | |
| 5 | ## How to Use This Skill |
| 6 | |
| 7 | When answering API Gateway questions: |
| 8 | |
| 9 | 1. Read the relevant reference file(s) before responding, do not rely solely on this summary |
| 10 | 2. For tasks spanning multiple concerns (e.g., "private API with mTLS and custom domain"), read all relevant references |
| 11 | 3. When the user needs IaC templates, consult `references/sam-cloudformation.md` or `references/sam-service-integrations.md` and provide complete, working SAM/CloudFormation YAML |
| 12 | 4. Always mention relevant pitfalls and limits that affect the user's design |
| 13 | |
| 14 | ## Quick Decision: Which API Type? |
| 15 | |
| 16 | Choose the right API type first. This decision affects every downstream choice. |
| 17 | |
| 18 | **REST API** is the full-featured API management platform for enterprises. It provides the governance, security, monetization, and operational controls that organizations need to build, publish, and manage APIs at scale, including usage plans with per-consumer throttling and quotas, API keys, request validation, WAF integration, resource policies, caching, canary deployments, and private endpoints. |
| 19 | |
| 20 | **HTTP API** is the lightweight, low-cost proxy optimized for simpler API workloads. It offers ~70% lower cost and lower latency but trades away the API management features. Choose HTTP API when you need a fast, lightweight proxy to Lambda or HTTP backends and don't require the enterprise controls above. |
| 21 | |
| 22 | | Factor | REST API (v1) | HTTP API (v2) | WebSocket API | |
| 23 | | ------------------------- | -------------------------------------- | ---------------------------------------------- | ------------------------------ | |
| 24 | | **Positioning** | **Full API management** | **Low-cost proxy** | **Real-time bidirectional** | |
| 25 | | Cost | Higher | ~70% cheaper | Per-message pricing | |
| 26 | | Latency | Higher | Lower | Persistent connection | |
| 27 | | Max timeout | 50ms-29s (up to 300s Regional/Private) | 30s hard limit | 29s | |
| 28 | | Payload | 10 MB | 10 MB | 128 KB message / 32 KB frame | |
| 29 | | **API Management** | | | | |
| 30 | | Usage plans/API keys | Yes | No | No | |
| 31 | | Request validation | Yes (JSON Schema draft 4) | No | No | |
| 32 | | Caching | Yes (0.5-237 GB) | No | No | |
| 33 | | Custom gateway responses | Yes | No | No | |
| 34 | | VTL mapping templates | Yes | No (parameter mapping only) | Yes | |
| 35 | | **Security & Governance** | | | | |
| 36 | | WAF | Yes | No (use CloudFront + WAF) | No | |
| 37 | | Resource policies | Yes | No | No | |
| 38 | | Private endpoints | Yes | No | No | |
| 39 | | mTLS | Yes (Regional custom domain only) | Yes (Regional custom domain only) | Via CloudFront viewer mTLS | |
| 40 | | **Auth** | | | |