Create cost anomaly subscription with percentage threshold with CloudFormation

0

I'm trying to create "AWS::CE::AnomalySubscription" with percentage threshold (not dollars) but it fails with "Properties validation failed for resource CostAnomalySubscription with message: #: required key [Threshold] not found #: extraneous key [ThresholdExpression] is not permitted" ThresHold only allows dollar value, not percentage. I want to define percentage value.

By looking at the documentation at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-anomalysubscription.html it says that ThresholdExpression should be used and Threshold is deprecated.

A snippet from my template in yaml: CostAnomalySubscription: Type: 'AWS::CE::AnomalySubscription' Properties: SubscriptionName: "MySubscription" ThresholdExpression: - '{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "10" ] } }' Frequency: "DAILY" MonitorArnList: [ !Ref CostAnomalyServiceMonitor ] Subscribers: [ { "Type": "EMAIL", "Address": "abc@def.com" } ]

To me it seems currently this is not possible using CloudFormation. When will it be? And how long it takes for AWS to NOT release anything until it's fully supported by CloudFormation or at least get the documentation right.

From documentation:

Threshold (deprecated)

The dollar value that triggers a notification if the threshold is exceeded.

This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.

One of Threshold or ThresholdExpression is required for this resource.

Required: Yes

Type: Double

Update requires: No interruption

profile picture
AkiK
질문됨 일 년 전353회 조회
2개 답변
0
  • Thank you. I also noticed that this feature eventually became available in CFN. I still feel features should not be released if not supported by CFN.

0

AWS::CE::AnomalySubscription resource doesn't support ThresholdExpression contrary to the document. AWS is working on it and, according to the CloudFormation coverage roadmap, the fix is coming soon.

답변함 일 년 전
  • Thanks for pointing me to the roadmap and you are correct the fix for ThresholdExpressions seems to be coming "soon".

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠