# AWS::Amplify::Domain The AWS::Amplify::Domain resource allows you to connect a custom domain to your app. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Type" : "AWS::Amplify::Domain", "Properties" : { "AppId" : String, "AutoSubDomainCreationPatterns" : [ String, ... ], "AutoSubDomainIAMRole" : String, "DomainName" : String, "EnableAutoSubDomain" : Boolean, "SubDomainSettings" : [ SubDomainSetting, ... ] } }### YAML
Type: AWS::Amplify::Domain Properties: AppId: String AutoSubDomainCreationPatterns: - String AutoSubDomainIAMRole: String DomainName: String EnableAutoSubDomain: Boolean SubDomainSettings: - SubDomainSetting## Properties #### AppId _Required_: Yes _Type_: String _Minimum_:
1
_Maximum_: 20
_Pattern_: d[a-z0-9]+
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### AutoSubDomainCreationPatterns
_Required_: No
_Type_: List of String
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### AutoSubDomainIAMRole
_Required_: No
_Type_: String
_Maximum_: 1000
_Pattern_: ^$|^arn:.+:iam::\d{12}:role.+
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### DomainName
_Required_: Yes
_Type_: String
_Maximum_: 255
_Pattern_: ^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\.)?$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### EnableAutoSubDomain
_Required_: No
_Type_: Boolean
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### SubDomainSettings
_Required_: Yes
_Type_: List of SubDomainSetting
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
## Return Values
### Ref
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Arn.
### Fn::GetAtt
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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).
#### Arn
Returns the Arn
value.
#### AutoSubDomainCreationPatterns
Returns the AutoSubDomainCreationPatterns
value.
#### AutoSubDomainIAMRole
Returns the AutoSubDomainIAMRole
value.
#### CertificateRecord
Returns the CertificateRecord
value.
#### DomainName
Returns the DomainName
value.
#### DomainStatus
Returns the DomainStatus
value.
#### EnableAutoSubDomain
Returns the EnableAutoSubDomain
value.
#### StatusReason
Returns the StatusReason
value.