Saltar al contenido

Docker container running on an ec2 instance cant connect to RDS AWS

0

I can access the RDS by ssh-ing into the EC2 instance, and passing the url and password to psql.

When I try to access the RDS via the docker container running on the EC2 using the same url and password I get the following output.

14:05:57.710 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "144.44.44.444", user "postgres", database "postgres", no encryption

Note: I replaced the host IP with a random value above.

2 Respuestas
1

Hello.

I think it's probably RDS PostgreSQL, but I think it can be resolved by setting the "rds.force_ssl" parameter in the RDS parameter group to 0, or by downloading the certificate described in the document below into the container and using it when connecting.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html

EXPERTO
respondido hace 2 años
EXPERTO
revisado hace 2 años
  • Thanks for this. In this case it was related to not setting ssl: true in the runtime.exs file.

0
Respuesta aceptada

This was resolved by setting ssl: true int the runtime.exs file.

respondido hace 2 años
EXPERTO
revisado 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.