By using AWS re:Post, you agree to the Terms of Use

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 Answers
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.

answered a month ago
  • 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.

answered 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions