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."

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

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

回答問題指南