Querying Redshift Serverless by Nodejs Getting permission issue.

0

I am encountering the following error while running my Node.js application to retrieve data using AWS Redshift Serverless. "'ERROR: permission denied for relation dashboard_view_product_sales_rank'," Here is my code below

    const redshiftDataApiClient = new AWS.RedshiftData({ region: 'eu-west-1' });

    const executeStatementInput = {
      WorkgroupName: 'workspace',
      Database:  'dev',
      Sql: getRedshiftSqlQuery()
    };
    const data = await redshiftDataApiClient.executeStatement(executeStatementInput).promise();

    const describe = await redshiftDataApiClient.describeStatement({ Id: data.Id }).promise();

    const result = await redshiftDataApiClient.getStatementResult({ Id: data.Id }).promise();

    return OK(result);

Rezaul
已提问 4 个月前349 查看次数
1 回答
0

Hi,

According to the following Knowledge Center post, that error might happen because the access is granted just for the current objects present in a schema when the access was granted and a user tries to access newly created objects, since, by default, access isn’t automatically granted on future objects that are created under that schema.

Take a look at the attached link as it describes step by step the commands to execute to resolve the error.

I hope this helps you.

profile picture
专家
已回答 4 个月前
  • I have changed some permissions and now I am getting this error "Redshift endpoint doesn't exist in this region."

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则