Ask Your Question

Revision history [back]

This error occurs because SCRAM authentication method for PostgreSQL was introduced in the libpq library in version 10, but the version installed on your AWS instance may be lower than 10. To resolve this issue, you need to upgrade the libpq library to version 10 or higher. You can do this by running the following command on your AWS instance:

sudo apt-get install libpq-dev

After this has been installed, retry connecting to PostgreSQL using psycopg2 and the error should be resolved.