Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.02 KB

Create-ReadOnly-User.md

File metadata and controls

44 lines (34 loc) · 1.02 KB

Amazon Redshift - Creating Read Only Users

  1. First, create a group that will be used for read only access: SQL
create group ro_group;
  1. Revoke default create rights in the public schema:
revoke create on schema public from group ro_group;
  1. Grant usage access in the public schema:
grant usage on schema public to group ro_group;
  1. Grant access to current tables in the public schema:
grant select on all tables in schema public to group ro_group;
  1. Grant access to future tables in the public schema:
alter default privileges in schema public grant select on tables to group ro_group;
  1. Create a user:
create user ro_user with password '<password>';
  1. Associate the new user and group:
alter group ro_group add user ro_user;
  1. To create additional read only users, repeat steps 6 and 7.

Reference

GRANT

Other SQL