Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to create a read-only user on Amazon Redshift. http://awsdocs.s3.amazonaws.com/redshift/latest/redshift-dg.pdf
  • Setup Database
create database [db-name];
revoke all on schema public from public;
create schema [schema-name];
create table [schema-name].[table-name](
  ...
) 
  • Create Read-only User
create user [user-name] password '[password]';
grant usage on schema [schema-name] to [user-name];
alter user [user-name] set search_path to [schema-name];
grant select on table [schema-name].[table-name] to [user-name];
@dshvedchenko

This comment has been minimized.

Copy link

dshvedchenko commented Nov 7, 2013

I don't think it is necessar
alter user [user-name] set search_path to [schema-name];

@abhayathem

This comment has been minimized.

Copy link

abhayathem commented Oct 15, 2015

very helpful :)

@m-vdb

This comment has been minimized.

Copy link

m-vdb commented Apr 6, 2016

I used grant select on all tables in schema [schema-name] to [user-name]; for the last step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.