Cloudwatch Insights查询结果保留多长时间?

问题描述 投票:0回答:1

当您使用AWS API到run a query against Cloudwatch logs时,您会收到queryId

{
   "queryId": "string"
}

然后,您可以call GetQueryResults using that query ID并从查询中检索结果。

{
   "results": [ 
      [ 
         { 
            "field": "string",
            "value": "string"
         }
      ]
   ],
   "statistics": { 
      "bytesScanned": number,
      "recordsMatched": number,
      "recordsScanned": number
   },
   "status": "string"
}

我的问题是这些查询结果保留了多长时间?我可以运行查询,并在一个月后回来获得结果吗?一年后?

我似乎无法从亚马逊找到任何解释保留政策的文档。在没有官方消息来源的情况下,我会根据使用此API的轶事经验接受答案。

amazon-web-services amazon-cloudwatch amazon-cloudwatchlogs aws-cloudwatch-log-insights
1个回答
0
投票

据我所知,CW Logs保留是“永远” - 请参阅the official documentation page

默认情况下,日志会无限期保留,永不过期。您可以调整每个日志组的保留策略,保持无限期保留,或选择10年到一天之间的保留期。

检索此类数据时,您会收取费用。

© www.soinside.com 2019 - 2024. All rights reserved.