AWS::ServiceDiscovery::PublicDnsNamespace - AWS CloudFormation


Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace and name your service backend, the resulting DNS name for the service is For the current quota on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits in the AWS Cloud Map Developer Guide.


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


{ "Type" : "AWS::ServiceDiscovery::PublicDnsNamespace", "Properties" : { "Description" : String, "Name" : String, "Tags" : [ Tag, ... ] } }


Type: AWS::ServiceDiscovery::PublicDnsNamespace Properties: Description: String Name: String Tags: - Tag



A description for the namespace.

Required: No

Type: String

Maximum: 1024

Update requires: Replacement


The name that you want to assign to this namespace.

Required: Yes

Type: String

Maximum: 1024

Pattern: ^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?$

Update requires: Replacement


The tags for the namespace. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Required: No

Type: List of Tag

Maximum: 200

Update requires: Updates are not supported.

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the value of Id for the namespace, such as ns-e4anhexample0004.

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 Amazon Resource Name (ARN) of the public namespace.


The ID of the public namespace.


Create a public DNS namespace

The following example creates a public DNS namespace named


{ "Type" : "AWS::ServiceDiscovery::PublicDnsNamespace", "Properties" : { "Description" : "AWS Cloud Map public DNS namespace for website", "Name" : "" } }


Type: 'AWS::ServiceDiscovery::PublicDnsNamespace' Properties: Description: AWS Cloud Map public DNS namespace for website Name:

See also