Redshift serverless

0

How to restrict user under redshift cluster to access db and schemas, can you share steps to configure it. Also how to create roles according to above scenario.

已提問 1 年前檢視次數 229 次
1 個回答
0

The first step is to create a new user who will have restricted access.

CREATE USER newuser PASSWORD 'password';

Next, you can create a new schema that this user will have access to

CREATE SCHEMA newschema;
GRANT USAGE ON SCHEMA newschema TO newuser;
GRANT SELECT ON TABLE newschema.newtable TO newuser;

Roles in Redshift are a way to manage privileges for groups of users.

CREATE GROUP newgroup;
ALTER GROUP newgroup ADD USER newuser;

Now you can grant privileges to the group, and all users in the group will have those privileges.

GRANT SELECT ON TABLE newschema.newtable TO GROUP newgroup;

You can refer the following link

https://docs.aws.amazon.com/redshift/latest/dg/c_redshift-sql.html

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南