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);

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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠