gpt4 book ai didi

amazon-web-services - AWS CLI 与控制台 - 成本管理器

转载 作者:行者123 更新时间:2023-12-04 01:27:16 25 4
gpt4 key购买 nike

我发现 AWS Cost Explorer Console 和 AWS CLI Cost Explorer 给出了两个不同的数字。关于为什么会发生这种情况的任何原因?

例如 :
在我的控制台中,您可以看到 Cloudtrail 的总金额为 72.66 美元

enter image description here

但是,当我为 CLI 设置这些完全相同的指标时,我的总数是 72.04 美元

enter image description here

我知道这似乎没什么大的区别,我只是以 Cloudtrail 为例,但我的一些价格较高的服务有更大的差异。是否有原因造成这种情况/是否可以采取措施使控制台和 CLI 具有匹配的月度成本?

最佳答案

根据 AWS CLI Command Reference ,您必须在结束日期多加 1 天。因此,就您而言,您需要获取 4 月份(从 2020-04-01 到 2020-04-30)的报告。现在,您必须在结束日期前再添加 1 天,即 2020-05-01。

Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01 , then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01



因此,您的时间段参数将类似于 --time-period Start=2020-04-01,End=2020-05-01

关于amazon-web-services - AWS CLI 与控制台 - 成本管理器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61673649/

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