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
asked 4 months ago314 views
1 Answer
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
EXPERT
answered 4 months ago
  • I have changed some permissions and now I am getting this error "Redshift endpoint doesn't exist in this region."

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions