AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ServiceDiscovery::PrivateDnsNamespace

CfnPrivateDnsNamespace

Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace `example.com` and name your service `backend` , the resulting DNS name for the service is `backend.example.com` . Service instances that are registered using a private DNS namespace can be discovered using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same AWS account , see [AWS Cloud Map quotas](https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the *AWS Cloud Map Developer Guide* .

Import

import { CfnPrivateDnsNamespace } from 'aws-cdk-lib/aws-servicediscovery';

Or use the module namespace:

import * as servicediscovery from 'aws-cdk-lib/aws-servicediscovery';
// servicediscovery.CfnPrivateDnsNamespace

Properties

Configuration passed to the constructor as CfnPrivateDnsNamespaceProps.

nameRequired
string

The name that you want to assign to this namespace. When you create a private DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.

vpcRequired
string

The ID of the Amazon VPC that you want to associate the namespace with.

descriptionOptional
string

A description for the namespace.

propertiesOptional
IResolvable | PropertiesProperty

Properties for the private DNS namespace.

tagsOptional
CfnTag[]

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.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

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

LevelL1 (CloudFormation)
Moduleaws-servicediscovery
CFN TypeAWS::ServiceDiscovery::PrivateDnsNamespace
Properties5

External Links