admin管理员组文章数量:1122846
I have an AWS RDS that I'm accessing securely via AWS SSM and Bastion. I do the following to start an AWS session:
- In my terminal, set AWS session credentials
- Run AWS SSM:
aws ssm start-session --target bastion-instance-id --region my-region --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"host": ["awsrdsurl.rds.amazonaws"], "portNumber":["5432"], "localPortNumber": ["5896"]}'
- I get the following:
- Starting session with SessionId: session-id
- Port 5896 opened of sessionId session-id
- Waiting for connections...
I am able to connect to the session using psql: psql -h localhost -p 5896 -U my-db-username -d my-db-name
. This indicates to me that the port forwarding is working.
I'm not able to connect to the session using pgAdmin, it gives me "Unable to connect to server: connection timeout expired".
My "Connection" tab has:
- Host name/address: localhost
- Port: 5896
- Maintenance database: my-db-name
- Username: my-db-username
- Password: my-db-password
My "Parameters" tab has:
- "Connection timeout (seconds)" with value 120
I've tried connection timeout up to 300s and it's the same thing.
When I try to connect, I'm not connected to the SSM session with psql
so it's the only connection attempt to the SSM session.
The above worked at one point, I had the server connection set up in pgAdmin for a couple months ago and I had removed it today to walk through setting it up from scratch and this happened. I've also updated to the latest version of pgAdmin (v8.13).
I'm not sure what I should be checking and if I'm completely missing something in my setup, any help/advice would be greatly appreciated!
本文标签: postgresqlAWS RDS Connection with SSM and BastionpgAdmin Connection TimeoutStack Overflow
版权声明:本文标题:postgresql - AWS RDS Connection with SSM and Bastion - pgAdmin Connection Timeout - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308057a1933526.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论