Why does my "Evaluate Block for Each" AWS Services Policy when filtered by AWS Service Items not trigger as expected?
search cancel

Why does my "Evaluate Block for Each" AWS Services Policy when filtered by AWS Service Items not trigger as expected?

book

Article ID: 283665

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction


This Article is valid as on July 2023.  Refer to release notes for future changes.

 

"Evaluate Block for Each AWS Service" policies act on the sum of the selected individual Service Items (filters) within that service.  They do not evaluate on each individual Service Item! 

 


Aria Cost Billing Statement Polices allow a user to evaluate by Advanced Options - "Evaluate Block for Each" => "AWS Service". 



The policy Rule further allows each AWS Service to be filtered down to include (or exclude) selected "AWS Services" within the "for each" service item totals.    

 

 

Important ! 

The AWS Service "Evaluate Block for Each" will be the sum of all the selected individual "AWS Service Items" within that "AWS Service".  The policy will use this sum value to evaluate the condition.  The individual selected services are not considered (unless they are of course the only item selected within the AWS Service). 


Examples: 



In the above screen capture ...

1) AWS Service "Amazon API Gateway - Direct" total will be evaluated on the amount from the selected filter "API Gateway - API Call" but will not include any amount in "API - Gateway - Data Transfer" as it is not selected.  

2) "Amazon AppStream - Direct" will evaluate based on the sum total of "AppStream - Fleet Instance"plus the "AppStream - Image Builder Instance" items because both are selected (but for NOT each individual item).

3) "Amazon Athena" will not be evaluated as there are no Service Items selected in its filter.


To further illustrate this, given a policy that is set to violate on a >10% increase in the above "AmazonApp Stream - Direct" service.  The "Evaluate Block for Each AWS Service" is set.  Suppose that the service "AppStream - Fleet Instance" has an unchanging cost of $100/day and the "AppStream Image Builder Instance" changes from $100 to $111 over one day.  The policy would NOT trigger because the "Amazon AppStream Direct" service cost went from $200 to $211 which is not a 10% increase.  You may have expected it to trigger as the filter item did increase by over 10% but this is not the case. The entire service must increase and the service is based on the sum of the selected filter items.