且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySqlConnection Open()无法打开,没有错误被捕获

更新时间:2023-01-27 21:29:23

超时通常表示网络连接问题.

假设:

  • AWS Lambda函数配置为使用与Aurora实例相同的VPC

您的安全组配置应为:

  • Lambda函数上的安全组(Lambda-SG)-允许所有出站
  • Aurora数据库上的安全组(Aurora-SG)-允许来自Lambda-SG
  • 的适当端口(3306?)上的入站连接
  • A Security Group on the Lambda function (Lambda-SG) — Allow all Outbound
  • A Security Group on the Aurora database (Aurora-SG) — Allow inbound connections on the appropriate port (3306?) from Lambda-SG

也就是说,Aurora-SG专门允许来自Lambda-SG的入站流量.

That is, Aurora-SG specifically allows inbound traffic from Lambda-SG.