'flask-react-aws recreate_db SCRAM auth error

In Getting Started, Part 1, Chapter 4, of Deploying a Flask and React Microservice to AWS ECS, when running

$ docker-compose exec api python manage.py recreate_db

Receiving the following error:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SCRAM authentication requires libpq version 10 or above

From reading this and this SO posts, and being on an Apple M1 Mac, I added platform: linux/amd64 to the api service in docker-compose.yml, which got me past the error, albeit not sure if this is the correct solution in this case.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source