如何从 aws 'Endpoint' 中找到 unix 'host'

How to find the unix 'host' from the aws 'Endpoint'

我正在寻找要在此配置选项中使用的 aws 数据库服务器的 'host':

-h host
--host=host

Specifies the host name of the machine on which the server is running.
If the value begins with a slash, it is used as the directory for the
Unix domain socket. The default is taken from the PGHOST environment
variable, if set, else a Unix domain socket connection is attempted.

但我只能找到这个'Endpoint':

Endpoint: foobar.ab12cd34ef.eu-west-1.rds.amazonaws.com:5432

有关系吗?有没有办法从 'Endpoint' 中提取 'host'?

使用端点作为您的主机,这是您应该用来连接到 RDS 的主机。 5432 是它 运行 所在的端口。

RDS 为您提供了一个端点,因为根据设计,它可以有多个后端 "hosts"(数据库实例)服务数据,例如在多可用区环境中。通过为您提供端点,当您的主机出现故障并且从机升级为主机等时,您不必更改连接字符串。