AWS: can't connect to RDS database from my machine

后端 未结 7 1531
野的像风
野的像风 2021-01-30 10:10

The EC2 instance/live web can connect just fine to the RDS database. But when I want to debug the code in my local machine, I can\'t connect to the database and got this error:<

7条回答
  •  醉酒成梦
    2021-01-30 11:00

    I was also not able to connect even from inside an ec2 instance.

    After digging AWS RDS options it turns out that ec2 instances are only able to connect to RDS in the same VPC they are in.

    When creating an ec2 instance in the same VPC where the RDS was I could access it as expected.

提交回复
热议问题