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?

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

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

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

관련 콘텐츠