diff --git a/cloud/amazon/ec2_metric_alarm.py b/cloud/amazon/ec2_metric_alarm.py index 578a1af7297..b9ac1524794 100644 --- a/cloud/amazon/ec2_metric_alarm.py +++ b/cloud/amazon/ec2_metric_alarm.py @@ -184,7 +184,7 @@ def create_metric_alarm(connection, module): comparisons = {'<=' : 'LessThanOrEqualToThreshold', '<' : 'LessThanThreshold', '>=' : 'GreaterThanOrEqualToThreshold', '>' : 'GreaterThanThreshold'} alarm.comparison = comparisons[comparison] - dim1 = module.params.get('dimensions') + dim1 = module.params.get('dimensions', {}) dim2 = alarm.dimensions for keys in dim1: