API Gateway Route

An API Gateway Route in AWS defines how incoming requests are directed to backend integrations within an API Gateway v2 API. It matches requests based on an HTTP method and a route key, such as a specific path or wildcard pattern. Routes determine which integration, like a Lambda function or HTTP endpoint, should handle the request. This allows you to control request flow, organize endpoints, and manage how clients interact with your API.

aws.apigatewayv2_route

Fields

TitleIDTypeData TypeDescription
_keycorestring
account_idcorestring
api_gateway_managedcoreboolSpecifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.
api_idcorestring
api_key_requiredcoreboolSpecifies whether an API key is required for this route. Supported only for WebSocket APIs.
authorization_scopescorearray<string>A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
authorization_typecorestringThe authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
authorizer_idcorestringThe identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
model_selection_expressioncorestringThe model selection expression for the route. Supported only for WebSocket APIs.
operation_namecorestringThe operation name for the route.
request_modelscorehstoreThe request models for the route. Supported only for WebSocket APIs.
request_parameterscorestringThe request parameters for the route. Supported only for WebSocket APIs.
route_arncorestring
route_idcorestringThe route ID.
route_response_selection_expressioncorestringThe route response selection expression for the route. Supported only for WebSocket APIs.
tagscorehstore
targetcorestringThe target for the route.