简体   繁体   English

无法连接到AWS RDS还原的实例

[英]Unable to connect to AWS RDS restored instance

I have created a RDS instance with PostgreSQL database connected in PGAdmin tool and also connected the instance with the help of psql from local system 我已经创建了一个RDS实例,并在PGAdmin工具中连接了PostgreSQL数据库,并且还在本地系统的psql的帮助下连接了该实例。

psql --host=XXX.XXX.us-east-1.rds.XX.com --port=5433 --username=myusername --password --dbname=MyDB

I have performed several DB operation and then i have deleted the instance and saved the final snapshot of my instance before deleting. 我执行了几次数据库操作,然后删除了实例,并在删除之前保存了实例的最终快照。

And then i have restore the final snapshot and started the instance again and now am unable to connect to this instance 然后我已经还原了最终快照并再次启动了实例,现在无法连接到该实例

What goes wrong when restoring the RDS snapshot...? 还原RDS快照时出了什么问题?

When you delete an instance, all properties associated with it are deleted or detached. 删除实例时,与之关联的所有属性都将被删除或分离。 This is not the same as stopping an ec2 instance. 这与停止ec2实例不同。 you need to fully recreate the RDS instance identically to the previous instance. 您需要完全与先前的实例完全一样重新创建RDS实例。 you may not be Assigned the same IP address, endpoint name. 您可能没有被分配相同的IP地址,端点名称。 security groups, routing associations, VPC and zone placement all need consideration. 安全组,路由关联,VPC和区域放置都需要考虑。 It is best to use a script or cloud formation to do this as its nearly impossible to replicate the configuration exactly by memory. 最好使用脚本或云形式来执行此操作,因为几乎不可能完全通过内存复制配置。 IP and DNS may need to be changed on your client app. IP和DNS可能需要在您的客户端应用上更改。 A common mistake is to neglect to set public Access who's is off by default, but often enabled for development while learning the subtleties of private sub nets, security groups,route tables etc. 一个常见的错误是忽略了默认情况下将“公共访问者”设置为关闭,但在学习专用子网,安全组,路由表等的细微之处时却经常启用该功能。

检查VPC配置,还原时可能选择了创建新的VPC安全组,该组默认拒绝大多数IP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM