Attempting to connect Lightsail Database to Microsoft PowerAutomate using PostgreSQL module. How can I make it work?


The database is up and running with Public Mode enabled. There are no instances, containers or static IPs, just the database. I've been able to connect to, and work with the database with pgAdmin, Javascript, and Python, but the error comes when I try to connect it with Microsoft PowerAutomate. We've tried:

  • Double checking the credentials.
  • Adding port to the 'Server' field in PowerAutomate as 'endpoint:port'
  • Trying it with RDS to see if Lightsail is the issue (doesn't work with RDS either) The error we're getting is: Credentials are missing or not valid. inner exception: The credentials provided for the PostgreSQL source are invalid. (Source: endpoint:dbname). Personally, I think we might have done something wrong with the way the credentials should be formatted on PowerAutomate, but I'm not sure. Thank you for your help!
feita há um mês340 visualizações
1 Resposta

The credentials in this context are probably simply the internal PostgreSQL user's username and password that you've entered. While the setup is very insecure with anyone on the public internet able to connect and try to log in, it sounds from the error message that connectivity, DNS resolution, etc. are all working and only the username/password combination you've entered isn't correct.

You should make sure there are no typos, that upper- and lowercase letters match for both the username and password, and that there are no empty spaces before or after either the username or password.

For a minimum level security boost, you should also use a reliable random password generator (such as to generate completely random and as long passwords as the password generator supports for all the users with access to your database. This will help to protect against simple password spraying attacks (brute-forcing the password). Also make sure that the database has automatic updating enabled, so that known vulnerabilities get patched automatically, and set the connection from Power Automate to use in-transit encryption for the connection.

Leo K
respondido há um mês
  • I've double checked the username and password, and it still doesn't work. In terms of security, the data isn't high risk so we're not terribly worried about it, but thanks for raising awareness about it, we'll consider adding it after we solve this issue. Is there any known issues with the Power Automate integration of postgreSQL? Does the way AWS lightsail /RDS use postgreSQL makes Power Automate reject the credentials?

  • Since you can connect to the database with general commodity tools like pgAdmin without having to do or configure anything special, there's clearly nothing unusual about how the database is working. Just to be doubly sure, did you also check the capitalisation of the username and not just the password? And did you enable TLS encryption for the connection in the Power Automate connector? It's possible to require TLS using encrypted connections for a PostgreSQL RDS database, in which case logging on without wouldn't work.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas