RDS 端点名称格式

RDS endpoint name format

在 AWS 中,RDS 端点名称具有以下格式

my-db-name.aaaaaaaaaaaa.eu-west-1.rds.amazonaws.com

标识符的第二部分是一系列看似随机的字符。这是如何产生的?它似乎在同一账户和区域中的所有 rds 实例中都是一致的。是否有任何其他因素会导致它发生变化。

我查看了 AWS 文档,但找不到任何相关信息。

文档中似乎没有明确说明,但有 AWS 员工撰写的 AWS 支持论坛帖子,如下所示。

总而言之,它是一个不透明的标识符,由未公开披露的算法在内部生成,并且不应针对给定的区域+帐户组合进行更改。重用旧名称的新实例应与旧实例具有相同的端点。

此处的术语“hexchars”指的是您所询问的端点主机名的组成部分:

1. Is there some way to "predict" or otherwise determine what the hexchars will be?

You can't predict it, but once you create at least one instance in a region you will know what it is for your account in that region (and it will be the same for all RDS instances belonging to the same account in that region).

2. Is there a way to set this?

No. The "hexchars" component is generated internally and is unique to your AWS account in each region (cannot be changed). The "hexchars" will be different for the same account in a different region.

3. Is the hexchars consistent if the instance ID is consistent?

Yes. You can delete an instance and if you create another with the same name, it will have the same endpoint address as the original instance (for the same AWS account in the same region). Also, if you rename an instance from "myinst1" to "myinst2", the first component is the only that changes and the "hexchars.region.rds.amazonaws.com" remains the same.

https://forums.aws.amazon.com/thread.jspa?messageID=486170&#486199