{
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {
"AWS::CloudFormation::Designer": {
"0146279a-ddf6-40fa-bf45-612cebe20c3f": {
"size": {
"width": 60,
"height": 60
},
"position": {
"x": 290,
"y": 80
},
"z": 0,
"embeds": []
},
"f53318cc-f7a9-4e0b-9d22-7de325b7409d": {
"size": {
"width": 60,
"height": 60
},
"position": {
"x": 430,
"y": 80
},
"z": 0
}
}
},
"Resources": {
"EMRC1YFGX": {
"Type": "AWS::EMR::Cluster",
"Properties": {
"ReleaseLabel": "emr-5.30.0",
"Instances": {
"MasterInstanceGroup": {
"InstanceCount": 1,
"InstanceType": "m5.xlarge"
},
"CoreInstanceGroup": {
"InstanceCount": 1,
"InstanceType": "m5.xlarge"
}
},
"Name": "Tupac",
"JobFlowRole": "arn:aws:iam::261537044157:instance-profile/EMR_EC2_DefaultRole",
"ServiceRole": "arn:aws:iam::261537044157:role/shubhamam"
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "0146279a-ddf6-40fa-bf45-612cebe20c3f"
}
}
},
"CWA2VB7L": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"AlarmName": "alarm101",
"AlarmActions": ["arn:aws:sns:us-east-1:2615370449570:emr_idle_notification"],
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"Dimensions": [
{
"Name": "JobflowId",
"Value": {"Ref": "EMRC1YFGX"}
}
],
"EvaluationPeriods": 1,
"MetricName": "IsIdle",
"Namespace": "AWS/ElasticMapReduce",
"Period": 300,
"Statistic": "Minimum",
"Threshold": 1,
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "f53318cc-f7a9-4e0b-9d22-7de325b7409d"
}
}
}
}
}
我正在使用上述cloudformation模板来创建我的EMR集群和Cloudwatch警报。如果我从控制台创建了正常警报,则它无法正常工作,但是在cloudformation期间创建时,它不起作用。 警报已创建,但无法从EMR指标获取任何数据。它说没有数据,并且仍处于数据不足状态。