AWS::ApiGatewayV2::DomainName - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The AWS::ApiGatewayV2::DomainName resource specifies a custom domain name for your API in Amazon API Gateway (API Gateway).

You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see Set up Custom Domain Name for an API in API Gateway in the API Gateway Developer Guide.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::ApiGatewayV2::DomainName", "Properties" : { "DomainName" : String, "DomainNameConfigurations" : [ DomainNameConfiguration, ... ], "MutualTlsAuthentication" : MutualTlsAuthentication, "Tags" : {Key: Value, ...} } }


Type: AWS::ApiGatewayV2::DomainName Properties: DomainName: String DomainNameConfigurations: - DomainNameConfiguration MutualTlsAuthentication: MutualTlsAuthentication Tags: Key: Value



The custom domain name for your API in Amazon API Gateway. Uppercase letters are not supported.

Required: Yes

Type: String

Update requires: Replacement


The domain name configurations.

Required: No

Type: Array of DomainNameConfiguration

Update requires: No interruption


The mutual TLS authentication configuration for a custom domain name.

Required: No

Type: MutualTlsAuthentication

Update requires: No interruption


The collection of tags associated with a domain name.

Required: No

Type: Object of String

Pattern: .*

Update requires: No interruption

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the domain name, such as

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.


The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.


Domain name creation example

The following example creates a DomainName resource called MyDomainName.


{ "MyDomainName": { "Type": "AWS::ApiGatewayV2::DomainName", "Properties": { "DomainName": "", "DomainNameConfigurations": [ { "EndpointType": "REGIONAL", "CertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/1a2b3c4d-aaaa-aaaa-aaaa-1a2b3c4d5e6f", "CertificateName": "testCertificate" } ] } } }


MyDomainName: Type: 'AWS::ApiGatewayV2::DomainName' Properties: DomainName: DomainNameConfigurations: - EndpointType: REGIONAL CertificateArn: >- arn:aws:acm:us-east-1:123456789012:certificate/1a2b3c4d-aaaa-aaaa-aaaa-1a2b3c4d5e6f CertificateName: testCertificate

See also