Redshift Serverless query from Data API

0

I seem to have trouble accessing the Redshift serverless resources from the Data API. The Data API does not respect the WorkgroupName attribute. Thoughts?

aws redshift-data list-databases --database dev3 --workgroup-name wg6 --region us-east-1

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: --workgroup-name, wg6
2개 답변
1

Hi,

What is the version of the aws cli ? aws --version

I have just tried it and the workgroup-name attribute worked. It was tested with aws cli version 2.7.35.

Thanks,

AWS
전문가
Ziad
답변함 일 년 전
-1

You need to authenticate using Secrets ARN or temporary credentials.

From https://docs.aws.amazon.com/cli/latest/reference/redshift-data/list-databases.html:

Depending on the authorization method, use one of the following combinations of request parameters:

  • Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name.
  • Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, permission to call the redshift-serverless:GetCredentials operation is required.

You can see examples of using Secrets Manager in this blog post: https://aws.amazon.com/blogs/big-data/using-the-amazon-redshift-data-api-to-interact-with-amazon-redshift-clusters/

AWS
Don_D
답변함 일 년 전
  • The question is about Redshift serverless, which does not have cluster identifiers. Can you share an example of using Data API for Redshift serverless and not Redshift?

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

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

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

관련 콘텐츠