By using AWS re:Post, you agree to the Terms of Use
/AWS Cost Anomaly Detection/

Questions tagged with AWS Cost Anomaly Detection

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Cost Anomaly Detection in Cloudformation

I'm trying to set up a Cost Anomaly Detection monitor + subscription in Cloudformation. Creating this via the AWS Console is very easy and user friendly. I set up a monitor with Linked Account, with a subscription that has a threshold of $100 with daily alert frequency, sending alerts to an e-mail. Trying to do the above was not as clear when following the documentation and examples at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-anomalymonitor.html The documentation does not explain what "dimension" or "type" means in this context, and those terms are not used in the AWS Console. ``` Resources: AnomalyMonitor100Dollars: Type: AWS::CE::AnomalyMonitor Properties: MonitorName: AnomalyDetected_is_greater_than_100_dollars MonitorType: CUSTOM MonitorSpecification: !Sub ' { "Dimensions" : { "Key" : "LINKED_ACCOUNT", "Values" : [ "${AWS::AccountId}" ] } }' AnomalySubscription: Type: AWS::CE::AnomalySubscription Properties: SubscriptionName: AnomalyDetected_is_greater_than_100_dollars Threshold: 100 Frequency: DAILY MonitorArnList: - !Ref AnomalyMonitor100Dollars Subscribers: [ { "Type": "EMAIL", "Address": "xx@example.com" } ] ``` Using the above, Cloudformation reports the error > "Linked accounts can only create AWS Services monitor (Service: CostExplorer, Status Code: 400..." Guessing wildly, adding `'MonitorDimension: SERVICE'` to the monitor gives the error > "MonitorDimension must be null for Custom monitor (Service: CostExplorer, Status Code: 400..." Guessing more wildly, trying to change to `'MonitorType: DIMENSIONAL'` gives the error > "Expression must be null for Dimensional monitor (Service: CostExplorer, Status Code: 400..." No idea what expression this refers to. I'm sure this is logical once you know the implementation, but I have no idea how to do this the correct way. What am I missing?
1
answers
0
votes
29
views
asked 5 months ago
  • 1
  • 90 / page