AWS Fundamentals Logo
AWS Fundamentals
AWS::ApiGatewayV2::ApiMapping

ApiGatewayV2 ApiMapping

The AWS::ApiGatewayV2::ApiMapping resource contains an API mapping. An API mapping relates a path of your custom domain name to a stage of your API. A custom domain name can have multiple API mappings, but the paths can't overlap. A custom domain can map only to APIs of the same protocol type. For more information, see [CreateApiMapping](https://docs.aws.amazon.com/apigatewayv2/latest/api-reference/domainnames-domainname-apimappings.html#CreateApiMapping) in the *Amazon API Gateway V2 API...

Properties

4 configurable properties. 3 required. Click a row to see details.

Filter:
PropertyTypeFlags
ApiId
string
Required
DomainName
string
RequiredCreate-only
Stage
string
Required
ApiMappingKey
string

Return Values

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

AttributeTypeDescription
ApiMappingIdstring-

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::ApiMapping

Resources:
  MyResource:
    Type: AWS::ApiGatewayV2::ApiMapping
    Properties:
      DomainName: "my-domainname"
      Stage: "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: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
Properties5
Required3
TaggingNot supported
Primary IDApiMappingId

Supported Operations

CreateUpdateReadDeleteList

Immutable After Creation

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

DomainName

External Links