RDS proxy: is the "endpoint" the "host"?

0

If I want to connect to the proxy, rather than the DB instance itself, should use the proxy endpoint as the "host" field in my connection config?

(I can't believe I can't find this stated anywhere in the RDS documentation. Am I not reading carefully enough?)

已提问 10 个月前388 查看次数
2 回答
1
已接受的回答

Yes, you will be using a proxy endpoint in the host option instead of an RDS endpoint to make use of RDS proxy for your connection. And you will find this proxy endpoint in console or cli.[+] [+] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-connecting.html#rds-proxy-connecting-native This should work provided that you have configured RDS proxy with the credentials you are intending to use in secret manager. [+] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-secrets-arns.html

profile picture
已回答 10 个月前
profile picture
专家
已审核 10 个月前
0

The RDS Proxy has a default endpoint that you connect to when working with an Amazon RDS DB instance. This endpoint is different from the read-write endpoint that connects directly to the DB instance.

The "host" refers to the specific DB instance or cluster that the RDS Proxy is connected to. The proxy can connect to multiple DB instances or clusters, and the "host" can change depending on the target group configuration.

When using RDS Proxy, you should connect to the proxy endpoint instead of the DB instance endpoint. This allows the proxy to manage the database connections and provide benefits like connection pooling, failover handling, and security through IAM and Secrets Manager integration.

RDS Proxy concepts and terminology - Amazon Relational Database Service

Introducing Amazon RDS Proxy (Preview)

AWS
已回答 10 个月前
  • There must be something fundamental here that I'm not understanding. Let me try to clarify my question...

    When I connect to a databased instance (hosted on AWS or elsewhere), I'm going to construct a connection string such as:

    postgresql://user:password@host:port/dbname
    

    What I can't figure out from the RDS docs is how to form this connection string when I want to connect to the proxy, rather than the instance itself. I'm assuming that the user password and dbname fields should be the same as the ones I would use to connect directly to the instance. But what about host? Should I use the endpoint for the proxy as the host?

    There must be something fundamentally wrong in my understanding of RDS proxies. What is it?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则