How to gain visibility into WAF service costs I have by client / project / application?

0

I would like to separate the WAF service costs I have by client / project / application. How to achieve that?

1 個回答
1
已接受的答案

You can get better visibility into WAF service cost by using User-defined cost allocation tags. Tags are key value pairs that can be attached to various AWS resources, such as WAF WebACLs, and then used as filters or dimensions in the Billing and Cost Management Console. Please follow these steps:

  1. Set up tagging strategy for your resources. If WAF costs should be split by project, the Tag key can be "project", or "waf-project".

  2. Add Tags to resources. If you're using CloudFormation or AWS SDK to manage the WebACLs, Tags can be added while the resources are being created. Alternatively, you can tag WebACL resources with the following AWS CLI command:

aws wafv2 tag-resource \                                                            
--resource-arn webacl-arn \
--tags Key=project,Value=project-name

You can use the TagResource API to add tags to resources with AWS SDK too. It's not possible to manage WebACL tags in the AWS Console today.

  1. In 24 hours the tag keys will be visible in the Billing and Cost Management Console under User-defined cost allocation tags page. Enable tag-based cost allocation monitoring for these tags (like "project" or "waf-project").

  2. You will be able to use these tags within next 24 hours in the Cost Explorer to Group by or Filter resource usage.

Please note that you need separate WebACLs for unique clients/projects/applications to make this approach work. You can, however, reuse the resources for the same clients/projects/applications.

AWS
Piotrek
已回答 3 個月前
profile picture
專家
已審閱 2 個月前
profile picture
專家
已審閱 3 個月前
profile pictureAWS
專家
已審閱 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南