I want to invoke execute_statement API of Redshift Serverless with a create user statement like CREATE USER "john" PASSWORD 'johnDoe1';. However, when I do this via Python script (or AWSCustomResource in CDK), I get
must be superuser or have CREATE USER system privilege to create users
And when I try to use my admin credentials by using DbUser like below, I get
DB User cannot be set during a serverless request.`
response = client.execute_statement(
WorkgroupName='emr-workgroup',
Database='dev',
DbUser='admin',
Sql=sql
)
How can I automate this without having to go manually to the query console and execute these queries? How an IAM role can be a superuser so that I can execute such queries in an automated way?