Amazon Route 53
API Reference


Creates a service, which defines the configuration for the following entities:

  • Up to three records (A, AAAA, and SRV) or one CNAME record

  • Optionally, a health check

After you create the service, you can submit a RegisterInstance request, and Amazon Route 53 uses the values in the configuration to create the specified entities.

For the current limit on the number of instances that you can register using the same namespace and using the same service, see Limits on Auto Naming in the Route 53 Developer Guide.

Request Syntax

{ "CreatorRequestId": "string", "Description": "string", "DnsConfig": { "DnsRecords": [ { "TTL": number, "Type": "string" } ], "NamespaceId": "string", "RoutingPolicy": "string" }, "HealthCheckConfig": { "FailureThreshold": number, "ResourcePath": "string", "Type": "string" }, "Name": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


A unique string that identifies the request and that allows failed CreateService requests to be retried without the risk of executing the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.

Type: String

Length Constraints: Maximum length of 64.

Required: No


A description for the service.

Type: String

Length Constraints: Maximum length of 1024.

Required: No


A complex type that contains information about the records that you want Route 53 to create when you register an instance.

Type: DnsConfig object

Required: Yes


Public DNS namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, Route 53 associates the health check with all the records that you specify in DnsConfig.

For information about the charges for health checks, see Route 53 Pricing.

Type: HealthCheckConfig object

Required: No


The name that you want to assign to the service.

Type: String

Pattern: ((?=^.{1,127}$)^([a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]|[a-zA-Z])(\.([a-z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]|[a-zA-Z]))*$)|(^\.$)

Required: Yes

Response Syntax

{ "Service": { "Arn": "string", "CreateDate": number, "CreatorRequestId": "string", "Description": "string", "DnsConfig": { "DnsRecords": [ { "TTL": number, "Type": "string" } ], "NamespaceId": "string", "RoutingPolicy": "string" }, "HealthCheckConfig": { "FailureThreshold": number, "ResourcePath": "string", "Type": "string" }, "Id": "string", "InstanceCount": number, "Name": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A complex type that contains information about the new service.

Type: Service object


For information about the errors that are common to all actions, see Common Errors.


One or more specified values aren't valid. For example, when you're creating a namespace, the value of Name might not be a valid DNS name.

HTTP Status Code: 400


No namespace exists with the specified ID.

HTTP Status Code: 400


The resource can't be created because you've reached the limit on the number of resources.

HTTP Status Code: 400


The service can't be created because a service with the same name already exists.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: