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
gefragt vor 4 Monaten349 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 4 Monaten
  • I have changed some permissions and now I am getting this error "Redshift endpoint doesn't exist in this region."

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen