query against rds aws mssql with cli


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"


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 Answer


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.

profile picture
answered 5 months ago
  • Hi, thanks a lot for your prompt answer. Is any way to query an mssql instance from my azure pipelines?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions