在 AWS 提供 RDS Postgres 的直接 postgres 中,您可以通过将参数组项设置rds.force_ssl
为 1来要求 SSL 。
这是根据 RDS postgres 文档:https : //docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
但是Aurora Postgres没有这个参数项,也没有添加新参数的能力。如何为 Aurora 实例开启 require ssl?
我可以在 Aurora 版本中看到它支持 SSL:
create extension sslinfo;
select ssl_is_used();
select ssl_cipher();
Run Code Online (Sandbox Code Playgroud)
我可以选择通过 ssl 连接:
psql -h my-ssl-test1.cwzhlddlylx.us-east-1.rds.amazonaws.com -p 5432
-U myuser -d mydb sslrootcert=rds-ca-2015-root.pem sslmode=verify-full
Run Code Online (Sandbox Code Playgroud)