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?

vignesh
preguntada hace 2 años1721 visualizaciones
2 Respuestas
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
respondido hace 2 años
  • 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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas