You can register your application's resources as instances in a AWS Cloud Map service. For example,
assume you've created a service called users
for all application resources that
manage user data. You can then register a DynamoDB table that's used to store user data as an
instance in this service.
Note
The following features are not available on the AWS Cloud Map console:
-
When you register a service instance using the console, you can't create an alias record that routes traffic to an Elastic Load Balancing (ELB) load balancer. When you register an instance, you must include the
AWS_ALIAS_DNS_NAME
attribute. For more information, see RegisterInstance in the AWS Cloud Map API Reference. -
If you register an instance using a service that includes a custom health check, you can't specify the initial status for the custom health check. By default, the initial status of a custom health checks is Healthy. If you want the initial health status to be Unhealthy, register the instance programmatically and include the
AWS_INIT_HEALTH_STATUS
attribute. For more information, see RegisterInstance in the AWS Cloud Map API Reference.
To register an instance in a service, follow these steps.
Sign in to the AWS Management Console and open the AWS Cloud Map console at https://console.aws.amazon.com/cloudmap/
. -
In the navigation pane, choose Namespaces.
-
On the Namespaces page, choose the namespace that contains the service that you want to use as a template for registering a service instance.
-
On the Namespace:
namespace-name
page, choose the service that you want to use. -
On the Service:
service-name
page, choose Register service instance. -
On the Register service instance page, choose an Instance type. Depending on the namespace instance discovery configuration, you can choose to specify an IP address, an Amazon EC2 instance ID, or other identifying information for a resource that doesn't have an IP address.
Note
You can choose EC2 instance only in HTTP namespaces.
-
For Service instance ID, provide an identifier associated with the service instance.
Note
If you want to update an existing instance, provide the identifier associated with the instance you want to update. Then, use the next steps to update values and reregister the instance.
-
Based on your choice of Instance type, perform the following steps.
Important
You can't use the
AWS_
prefix (not case sensitive) in a key when you specify a custom attribute.Instance type Steps IP address
-
Under Standard attributes, for IPv4 address, provide an IPv4 address, if any, where your application can access the resource that's associated with this service instance.
-
For IPv6 address, provide an IPv6 IP address, if any, where your applications can access the resource that's associated with this service instance.
-
For Port, specify any port your application must include to access the resource that's associated with this service instance. Port is required when the service includes an SRV record or an Amazon Route 53 health check.
-
(Optional) Under Custom attributes, specify any key-value pairs you want to associate with the resource.
EC2 instance -
For EC2 instance ID, select the ID of the Amazon EC2 instance that you want to register as a AWS Cloud Map service instance.
-
(Optional) Under Custom attributes, specify any key-value pairs you want to associate with the resource.
Identifying information for another resource -
Under Standard attributes, if the service configuration includes a CNAME DNS record, you'll see a CNAME field. For CNAME, specify the domain name that you want Route 53 to return in response to DNS queries (for example,
example.com
). -
Under Custom attributes, specify any identifying information for a resource that isn't an IP address or an Amazon EC2 instance ID as a key-value pair. For example, you can register a Lambda function by specifying a key called
function
and providing the name of the Lambda function as a value. You can also specify a key calledname
and provide a name that you can use for programmatic instance discovery.
-
-
Choose Register service instance.