I have a Postgres instance spun up in RDS and I've created a user via the following commands, however, they keep creating new tables and I can't figure out how to restrict them from creating.
CREATE USER my_ro_user WITH PASSWORD 'XXXXX';
GRANT CONNECT ON DATABASE "postgres" TO my_ro_user;
GRANT USAGE ON SCHEMA public TO my_ro_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO my_ro_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO my_ro_user;
REVOKE CREATE ON SCHEMA public FROM my_ro_user;
I thought the REVOKE in that last line would prevent them from creating new tables but that does not seem to be the case. What am I doing wrong?