query against rds aws mssql with cli

0

Hi, I tried query an mssql instance I have in rds with the following command:

aws rds-data execute-sql --db-cluster-or-instance-arn "arn:aws:rds:eu-west-1:******1:db:devtest-********-01-rds-db" --database "Js" --aws-secret-store-arn "arn:aws:secretsmanager:$(aws-region):$(aws-account-id):secret:${{ parameters.cluster }}-51WqBM" --sql-statements "SELECT 1"

or

aws rds-data execute-statement --resource-arn "arn:aws:rds:$(aws-region):$(aws-account-id):db:${{ parameters.cluster }}-rds-db" --database "J******s" --secret-arn "arn:aws:secretsmanager:$(aws-region):$aws-account-id):secret:${{ parameters.cluster }}-51WqBM" --sql "SELECT 1"

but I take always the following:

An error occurred (BadRequestException) when calling the ExecuteStatement operation: Invalid cluster arn:

ARN and secret has been check and they are correct. I suspect this is coming up because is not an Aurora SQL.

Anyone has a suggestion please?

1回答
0

Hello.

Yes, as you are aware, RDS Data API can only be used with Amazon Aurora Serverless v1.
Since this API cannot be used with normal RDS, it cannot be used with MSSQL either.
If you want to use RDS Data API, please use Aurora Serverless v1.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html

profile picture
エキスパート
回答済み 6ヶ月前
  • Hi, thanks a lot for your prompt answer. Is any way to query an mssql instance from my azure pipelines?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ