How to Create user in Redshift database

CREATE USER username PASSWORD ‘password‘;

CREATE USER username PASSWORD ‘password‘ CREATEDB;

CREATE USER username PASSWORD ‘password‘ CREATEDB CREATEUSER;

CREATE USER username PASSWORD ‘password‘ IN GROUP groupname;

CREATE USER username PASSWORD ‘password‘ VALID UNTIL ‘2021-12-31‘;

CREATE USER username PASSWORD ‘password‘ CONNECTION LIMIT 20;

Redshift database user password must be:

8 to 64 characters in length.

Must have atleast one uppercase letter, one lowercase letter, and one number.

Password can contain any special characters except ‘ (single quote) and ” (double quote)

To create user with MD5 password:

Obtain the md5 hash string of the username password combination as below:
select md5(‘password‘|| ‘username‘);

Create user username password ‘md5######’; (where ###### is the md5 hash string obtained from the previous step)

User will be able to login using username/password combination.

See also  How to access S3 from EC2 Instance using IAM role