AWS Fundamentals Logo
AWS Fundamentals
AWS::ApiGatewayV2::Route

ApiGatewayV2 Route

The AWS::ApiGatewayV2::Route resource creates a route for an API.

Properties

12 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
ApiId
string
RequiredCreate-only
RouteKey
string
Required
ApiKeyRequired
boolean
AuthorizationScopes
Array<string>
AuthorizationType
string
AuthorizerId
string
Write-only
ModelSelectionExpression
string
OperationName
string
RequestModels
object
RequestParameters
object
Write-only
RouteResponseSelectionExpression
string
Target
string

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
RouteIdstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ApiGatewayV2::Route

Resources:
  MyResource:
    Type: AWS::ApiGatewayV2::Route
    Properties:
      RouteKey: "value"
      ApiId: "my-apiid"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

apigateway:POST

update

apigateway:PATCHapigateway:GETapigateway:PUT

read

apigateway:GET

delete

apigateway:GETapigateway:DELETE

list

apigateway:GET

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceApiGatewayV2
Properties13
Required2
TaggingNot supported
Primary IDApiId

Supported Operations

CreateUpdateReadDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

ApiId

External Links