postgres-api
postgres-api copied to clipboard
Permissions error when using RDS
When using Amazon RDS PostgreSQL and binding an application to a service I get an error:
➜ flask-heroku-sample git:(master) tsuru service-bind flask-pg-dcarley -a flask-dcarley
Error: Failed to bind the instance "flask-pg-dcarley" to the app "flask-dcarley": must be member of role "flask_pg_d89d1e6"
The statement that causes this is:
ALTER DEFAULT PRIVILEGES FOR ROLE flask_pg_d89d1e6 GRANT ALL PRIVILEGES ON TABLES TO flask_pg_d_group
I have a feeling this is specific to RDS because the "admin" user doesn't have true superuser
privileges, only rds_superuser
. It works if I GRANT flask_pg_d89d1e6 TO pgadmin
but that doesn't seem like the right programatic fix. Any suggestions?
Is your shared admin user is the rds_superuser
user ?
Hi Samuel,
Yeah, it is.
@dcarley did you fix it ? What was your solution for running that on RDS ?
We didn't. The solution was to stop using RDS :wink:
I'd still be interested in trying to fix this, though.