Skip to content

Commit

Permalink
Anomalies : Lambda Code change to Store full array of root causes (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
yabindlish authored Jan 13, 2025
1 parent 739ef08 commit 54ae36c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions data-collection/deploy/module-cost-anomaly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,12 @@ Resources:
'TotalImpact': get_value_by_path(record, 'Impact/TotalImpact'),
'TotalImpactpercentage': float(get_value_by_path(record, 'Impact/TotalImpactPercentage', 0.0)),
'MonitorArn': get_value_by_path(record, 'MonitorArn'),
'LinkedAccount': get_value_by_path(record, 'RootCauses/0/LinkedAccount'),
'LinkedAccountName': get_value_by_path(record, 'RootCauses/0/LinkedAccountName'),
'Region': get_value_by_path(record, 'RootCauses/0/Region'),
'Service': get_value_by_path(record, 'RootCauses/0/Service'),
'UsageType': get_value_by_path(record, 'RootCauses/0/UsageType')
'LinkedAccount': get_value_by_path(record, 'RootCauses/0/LinkedAccount'), # for backward compatibility
'LinkedAccountName': get_value_by_path(record, 'RootCauses/0/LinkedAccountName'), # for backward compatibility
'Region': get_value_by_path(record, 'RootCauses/0/Region'), # for backward compatibility
'Service': get_value_by_path(record, 'RootCauses/0/Service'), # for backward compatibility
'UsageType': get_value_by_path(record, 'RootCauses/0/UsageType'), # for backward compatibility
'RootCauses': get_value_by_path(record, 'RootCauses', []), # Store full array of root causes
}
logger.debug("Processing record complete")
return result
Expand Down

0 comments on commit 54ae36c

Please sign in to comment.