Skip to content

Instantly share code, notes, and snippets.

@JacobJohansen
Created October 19, 2021 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JacobJohansen/c4542d7cb8cf90794892b17cae2f39f8 to your computer and use it in GitHub Desktop.
Save JacobJohansen/c4542d7cb8cf90794892b17cae2f39f8 to your computer and use it in GitHub Desktop.
Generic Redshift Grants
-- Read Users in Redshift
GRANT Temporary ON DATABASE "database_name" TO GROUP "read_users";
GRANT Usage ON SCHEMA "schema_name" TO GROUP "read_users";
GRANT References, Select ON ALL TABLES IN SCHEMA "schema_name" TO GROUP "read_users";
-- ReadWrite Users in Redshift
GRANT Temporary ON DATABASE "database_name" TO GROUP "read_write_users";
GRANT Usage ON SCHEMA "schema_name" TO GROUP "read_write_users";
GRANT ALL ON ALL TABLES IN SCHEMA "schema_name" TO GROUP "read_write_users";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment