DomainConfiguration - Amazon Serverless Application Model
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).

DomainConfiguration

Configures a custom domain for an API.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

Properties

BasePath

A list of the basepaths to configure with the Amazon API Gateway domain name.

Type: List

Required: No

Default: /

Amazon CloudFormation compatibility: This property is similar to the BasePath property of an AWS::ApiGateway::BasePathMapping resource. Amazon SAM creates multiple AWS::ApiGateway::BasePathMapping resources, one per BasePath specified in this property.

NormalizeBasePath

Indicates whether non-alphanumeric characters are allowed in basepaths defined by the BasePath property. When set to True, non-alphanumeric characters are removed from basepaths.

Use NormalizeBasePath with the BasePath property.

Type: Boolean

Required: No

Default: True

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

CertificateArn

The Amazon Resource Name (ARN) of an Amazon managed certificate this domain name's endpoint. Amazon Certificate Manager is the only supported source.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is similar to the CertificateArn property of an AWS::ApiGateway::DomainName resource. If EndpointConfiguration is set to REGIONAL (the default value), CertificateArn maps to RegionalCertificateArn in AWS::ApiGateway::DomainName. If the EndpointConfiguration is set to EDGE, CertificateArn maps to CertificateArn in AWS::ApiGateway::DomainName.

Additional notes: For an EDGE endpoint, you must create the certificate in the us-east-1 Amazon Region.

DomainName

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

Amazon SAM generates an AWS::ApiGateway::DomainName resource when this property is set. For information about this scenario, see DomainName property is specified. For information about generated Amazon CloudFormation resources, see Generated Amazon CloudFormation resources.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the DomainName property of an AWS::ApiGateway::DomainName resource.

EndpointConfiguration

Defines the type of API Gateway endpoint to map to the custom domain. The value of this property determines how the CertificateArn property is mapped in Amazon CloudFormation.

Valid values: REGIONAL or EDGE

Type: String

Required: No

Default: REGIONAL

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

MutualTlsAuthentication

The mutual Transport Layer Security (TLS) authentication configuration for a custom domain name.

Type: MutualTlsAuthentication

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the MutualTlsAuthentication property of an AWS::ApiGateway::DomainName resource.

OwnershipVerificationCertificateArn

The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Required only when you configure mutual TLS and you specify an ACM imported or private CA certificate ARN for the CertificateArn.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the OwnershipVerificationCertificateArn property of an AWS::ApiGateway::DomainName resource.

Route53

Defines an Amazon Route 53 configuration.

Type: Route53Configuration

Required: No

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

SecurityPolicy

The TLS version plus cipher suite for this domain name.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the SecurityPolicy property of an AWS::ApiGateway::DomainName resource.

Examples

DomainName

DomainName example

YAML

Domain: DomainName: www.example.com CertificateArn: arn-example EndpointConfiguration: EDGE Route53: HostedZoneId: Z1PA6795UKMFR9 BasePath: - foo - bar