Monitor EFS Cost and Usage filter rules for using boto3

0

Hi everyone,

I'm trying to monitor the EFS usage of a specific drive with the boto3 get_cost_and_usage. However, the return value is more than twice as large as I would expecy from my own bill and the data stored on EFS.

The function in question is:

resources = client.get_cost_and_usage(
    TimePeriod={
        'Start': start_time,
        'End': end_time
    },
    Filter=filter_rules,
    Granularity='DAILY',
    Metrics=['UsageQuantity', 'UnblendedCost']
)

With the filter rules:

[ { 'Key': 'Customer', 'Values': ['customer_id'], 'MatchOptions': ['EQUALS'] } ]

The EFS filesystem has the tag Customer=customer_id assigned.

Hence, the question is: what are the correct filter rules to monitor the usage of EFS in GIB/month?

Thank you in advance.

1 回答
0

Could you please check whether the tag you are using to filter is not being used for any other services. In case that is the situation then would request you to create a unique tag for EFS.

You can also refer to the below link to get indication around how tag should be implemented and used. https://aws.amazon.com/blogs/aws-cloud-financial-management/manage-your-amazon-elastic-file-system-efs-costs-using-aws-budgets/

AWS
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则