From docker container need to connect RDS - Using Session Manager

0

I have connected to private RDS from my local using DBeaver. And for this, I have used Session Manager. This post for really helpful to achieve that https://repost.aws/questions/QU9-N7fbk-SLOZvegK63XrRw/using-session-manager-to-connect-rds-without-having-ec-2-instance.

The same I need to connect to from a docker container. Could anyone advise me on this?

2 回答
0

I have installed AWS CLI and the session manager plugin inside the container and started the session. But is there any other way to make the connection from local and use the same connection to connect rds inside the container? FYI, I am using a rancher desktop.

vignesh
已回答 2 年前
  • Hi Vignesh, I might not have an answer here, but it might help other readers if you could elaborate on your setup.

    • Are you running your containers on a local machine or already on AWS?
    • Is your RDS instance in a private subnet (no public IP, as in your previous question)?
    • You're likely using the public Internet to connect to AWS? Neither VPN nor DirectConnect?
    • Is anything not working with the AWS CLI or are you looking for an alternative?

    kr, Uwe

0
  1. Are you running your containers on a local machine or already on AWS? - My containers are running on my local machine using a rancher's desktop.
  2. Is your RDS instance in a private subnet (no public IP, as in your previous question)? - Yes it is in the private subnet and has no public IP.
  3. You're likely using the public Internet to connect to AWS? Neither VPN nor DirectConnect? - Starting SSM Session from my local machine using AWS account credentials to connect RDS. (SSM Session - EC2 - RDS)
  4. Is anything not working with the AWS CLI or are you looking for an alternative? - From my local machine, If start an SSM session I can able to connect the RDS database. My question here is to start a session on the local machine and connect the RDS database from the container.

Currently, I am starting a session inside the container itself and in this case, I can connect the RDS database from the container.

vignesh
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则