gpt4 book ai didi

amazon-web-services - AWS Redshift 数据 API : An error occurred (ResourceNotFoundException) when calling the DescribeStatement operation: Query does not exist

转载 作者:行者123 更新时间:2023-12-04 13:10:36 30 4
gpt4 key购买 nike

几天前,我一直在用头撞墙,试图解决最近发布的 redshift data-api 发生的奇怪问题。 .我正在尝试使用 execute statement api 在我的 Redshift 集群上执行 SQL 语句并使用 list statements api 列出该语句.
在本地测试时,API 表现良好,我没有列出语句的问题。但是,在 Lambda 上部署我的代码后,我突然无法找到任何已执行的查询,即使我收到了 200 个针对执行语句请求的响应。
以下是我的 CloudWatch 日志的摘录,其中显示了带有查询 ID 的执行语句 200 响应:

{
"level": "INFO",
"location": "execute_asynchronous_sql_query:71",
"message": {
"message": "Successfully submitted sql query to redshift cluster",
"query_id": "706a0ca1-084c-4733-a534-571993afd23a",
"execution_statement_response": {
"ClusterIdentifier": "#######",
"CreatedAt": "2021-01-15 06:00:37.504000+00:00",
"Database": "#######",
"Id": "706a0ca1-084c-4733-a534-571993afd23a",
"SecretArn": "arn:aws:secretsmanager:##############",
"ResponseMetadata": {
"RequestId": "#######",
"HTTPStatusCode": 200,
"HTTPHeaders": {
"x-amzn-requestid": "#######",
"content-type": "application/x-amz-json-1.1",
"content-length": "237",
"date": "Fri, 15 Jan 2021 06:00:38 GMT"
},
"RetryAttempts": 0
},
"StatementName": "ww-redshift-asynch-2021-01-15T06:00:37.206308-summary_spots.sql"
}
},
"timestamp": "2021-01-15 06:00:38,008",
"service": "ww_dashboard",
"sampling_rate": 0,
"sample_rate": 0.4,
"xray_trace_id": "##############"
}
这是我在尝试 describe the SQL statement 时遇到的错误使用带有该查询 ID 的 AWS cli 来查看状态。
    aws redshift-data describe-statement --id 706a0ca1-084c-4733-a534-571993afd23a

An error occurred (ResourceNotFoundException) when calling the DescribeStatement operation: Query does not exist.

最佳答案

要执行的角色/用户 describe-statementget-statement-result需要与您使用的相同 execute-statement .
此外,需要是同一地区。

关于amazon-web-services - AWS Redshift 数据 API : An error occurred (ResourceNotFoundException) when calling the DescribeStatement operation: Query does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65734307/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com