diff --git a/eucaconsole/views/scalinggroups.py b/eucaconsole/views/scalinggroups.py index 0aeb9260c..1f25d73b4 100644 --- a/eucaconsole/views/scalinggroups.py +++ b/eucaconsole/views/scalinggroups.py @@ -658,7 +658,8 @@ def scalinggroup_policy_create(self): # Attach policy to alarm alarm_name = self.request.params.get('alarm') alarm = self.cloudwatch_conn.describe_alarms(alarm_names=[alarm_name])[0] - alarm.dimensions.update({"AutoScalingGroupName": self.scaling_group.name}) + if 'EC2' in alarm.namespace: + alarm.dimensions.update({"AutoScalingGroupName": self.scaling_group.name}) alarm.comparison = alarm._cmp_map.get(alarm.comparison) # See https://github.com/boto/boto/issues/1311 # TODO: Detect if an alarm has 5 scaling policies attached to it and abort accordingly if created_scaling_policy.policy_arn not in alarm.alarm_actions: