When you try to create CE resources using CloudFormation in regions like Ireland (eu-west-1), the stack fails at the validation step with the following error message: Template format error: Unrecognized resource types: [AWS::CE::AnomalySubscription, AWS::CE::AnomalyMonitor]
It's understood that CE is a global resource similar to IAM, but we can create IAM resources like AWS::IAM::Role outside of us-east-1.
AWSTemplateFormatVersion: "2010-09-09"
Resources:
AnomalyServiceMonitor:
Type: 'AWS::CE::AnomalyMonitor'
Properties:
MonitorName: 'MonitorName'
MonitorType: 'DIMENSIONAL'
MonitorDimension: 'SERVICE'
AnomalySubscription:
Type: 'AWS::CE::AnomalySubscription'
Properties:
SubscriptionName: "SubscriptionName"
Threshold: 100
Frequency: "IMMEDIATE"
MonitorArnList: [
!Ref AnomalyServiceMonitor
]
Subscribers: [
{
"Type": "SNS",
"Address": !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:my-topic-001"
}
]