canonical: https://jentic.com/apis/amazonaws.com/aws-apigatewayv2

# AWS AmazonApiGatewayV2

Amazon API Gateway V2 manages HTTP and WebSocket APIs at scale, supporting custom domains, stages, deployments, integrations, authorizers, and route mappings for event-driven and serverless architectures.

## For AI agents

Use the Amazon API Gateway V2 API to create and deploy HTTP and WebSocket APIs on AWS, with 72 operations covering the full control-plane lifecycle.

## Scope

Does not handle REST API v1 management, application code execution, or backend service hosting - use for HTTP and WebSocket API gateway configuration only.

## Capabilities

- Create HTTP and WebSocket APIs with custom routes and selection expressions
- Wire API routes to AWS Lambda, HTTP endpoints, and other AWS services through integrations
- Deploy APIs to named stages with per-stage throttling and access logging configuration
- Attach JWT and Lambda authorizers to routes for request-level authorization
- Map APIs to custom domain names with ACM certificates and base path mappings
- Import OpenAPI 3.0 definitions to bootstrap an API from an existing specification

## Use cases

### Serverless HTTP API for a Lambda backend

Expose AWS Lambda functions as low-latency HTTP endpoints by creating an HTTP API in API Gateway V2, defining routes that match incoming request methods and paths, and wiring each route to a Lambda integration. This pattern eliminates the need to run an always-on web server and scales automatically with request volume. Setup takes under an hour for a handful of routes once the Lambda functions exist.

Example prompt: Create an HTTP API named 'orders-api', add a POST /orders route, attach a Lambda proxy integration pointing at the orderHandler function, and deploy it to a $default stage.

### WebSocket API for live client updates

Build bidirectional client connections for chat, live dashboards, or game state by creating a WebSocket API with $connect, $disconnect, and custom message routes. API Gateway V2 manages the connection lifecycle, routes messages to backend integrations based on selection expressions, and supports per-connection callbacks for pushing data back to clients. Production setup typically takes one to two days including authorization and deployment automation.

Example prompt: Create a WebSocket API with $connect, $disconnect, and 'sendMessage' routes, each integrated with a dedicated Lambda function, and deploy to a production stage.

### Custom-domain multi-environment API

Front several API stages - for example dev, staging, and production - with custom subdomains backed by ACM-issued TLS certificates. API mapping resources connect each domain to the correct stage of the underlying API, so client base URLs remain stable across redeployments. Configuration is typically completed in under a day.

Example prompt: Create a custom domain 'api.example.com' with the supplied ACM certificate ARN, then add an API mapping that points the domain at the production stage of the orders API.

### AI agent provisioning API gateways through Jentic

An AI agent that builds out cloud infrastructure on demand can use Jentic to discover and call API Gateway V2 operations without hand-rolling an AWS SDK integration. The agent searches for the operation it needs, loads the input schema, and executes the call with scoped credentials so it never sees the raw AWS access keys. This compresses gateway provisioning steps from a multi-day SDK wiring task into minutes of agent runtime.

Example prompt: Search Jentic for 'create an HTTP API gateway', load the CreateApi schema, then execute it for an API named 'agent-built-api' with protocolType HTTP.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v2/apis | Create an HTTP or WebSocket API |
| GET | /v2/apis | List all APIs in the account |
| POST | /v2/apis/{apiId}/routes | Create a route on an API |
| POST | /v2/apis/{apiId}/integrations | Create an integration target for routes |
| POST | /v2/apis/{apiId}/deployments | Create a deployment for a stage |
| POST | /v2/apis/{apiId}/authorizers | Create a JWT or Lambda authorizer |

## Key resources

- **Apis** — Create, deploy and configure HTTP and WebSocket APIs
- **Routes** — Define request paths and selection expressions for API operations
- **Integrations** — Connect API routes to backend Lambda functions, HTTP endpoints, or AWS services
- **Stages** — Manage deployment stages with throttling, caching, and access logging
- **Authorizers** — Configure JWT and Lambda authorizers for request authorization
- **DomainNames** — Map APIs to custom domain names with TLS certificates

## Why Jentic

- **Setup:** Wiring Amazon API Gateway V2 by hand means creating IAM credentials, picking the right regional host from apigatewayv2.{region}.amazonaws.com, signing every request with AWS SigV4, and adding your own retry and pagination handling. Through Jentic you install once, import Amazon API Gateway V2 from the API Directory, store the AWS access key once, and your agent calls it.
- **Permission scoping:** Amazon API Gateway V2 puts the API id in the URL path (/v2/apis/{apiId}/routes, /v2/apis/{apiId}/integrations), so a rule can pin your agent to one API: it can add routes and integrations for that API and nothing else. You choose the operations it may call, so destructive ones like deleting an API or removing a deployment are not included unless you add them.
- **Credential handling:** Your AWS access key for Amazon API Gateway V2 is stored once, encrypted, by your own Jentic One instance and signed with SigV4 at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create an HTTP API with routes and integrations' or 'deploy an API to a production stage', and Jentic returns the matching Amazon API Gateway V2 operation with its input schema so the agent calls the right endpoint without browsing the AWS service reference.

## Related APIs

- **REST API v1** — API Gateway v1 supports REST APIs with private integrations, request/response mapping, and usage plans
- **Lambda functions** — Most API Gateway V2 routes terminate at AWS Lambda functions for serverless backends
- **WebSocket connection management** — API Gateway Management API pushes data back to connected WebSocket clients

## FAQ

### What authentication does the Amazon API Gateway V2 API use?

The Amazon API Gateway V2 API uses AWS Signature Version 4 (HMAC) request signing with IAM-issued credentials, the same scheme as every AWS service API. Jentic's your Jentic One instance stores those AWS credentials encrypted in the vault, generates short-lived signed requests at execution time, and never passes raw access keys into the agent's context.

### Can I create a new http API for my serverless backend with the Amazon API Gateway V2 API?

Yes - the Amazon API Gateway V2 API exposes 72 operations including the actions needed for that scenario. Use the operations listed in the key endpoints section as the starting point, then chain calls as needed for your workflow.

### What are the rate limits for the Amazon API Gateway V2 API?

AWS applies per-account, per-region request rate limits to the Amazon API Gateway V2 control plane. Specific limits are not encoded in the OpenAPI spec; consult the AWS service quotas console for the Amazon API Gateway V2 entry, and design retries with exponential backoff to absorb throttling responses.

### How do I create an HTTP API gateway with routes and integrations through Jentic?

Run pip install jentic, then call client.search('create an HTTP API gateway with routes and integrations') to discover the Amazon API Gateway V2 operations that match. Load the schema for the chosen operation with client.load(...) and execute it with client.execute(...). Jentic handles AWS request signing automatically against the credentials stored in your Jentic One instance.

### Is the Amazon API Gateway V2 API free to call?

AWS does not charge for control-plane API calls themselves on most Amazon API Gateway V2 operations, but the underlying resources you create or operate (fleets, queries, deployments, and so on) incur usage charges according to the Amazon API Gateway V2 pricing page. Refer to the AWS pricing page for the service to estimate cost.

### Which operations should an agent call first when working with the Amazon API Gateway V2 API?

For most workflows, agents should start by listing existing resources to understand the current state, then call the create or update operation that matches the intent. The endpoints listed under Key Endpoints in the catalog give a ranked starting set.

### Can I limit what my agent is allowed to do with the AWS API Gateway V2 API?

Yes. Because Jentic One is self-hosted, you set the rules that decide which operations and credentials your agent may use. AWS API Gateway V2 carries the API id in the URL path, as in /v2/apis/{apiId}/routes and /v2/apis/{apiId}/integrations, so you can pin the agent to a single API and let it add routes and integrations there while touching nothing else. You also choose the exact operations it may call, so destructive actions like deleting an API or removing a deployment stay excluded unless you explicitly allow them.
