diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_asg_facts.py b/lib/ansible/modules/extras/cloud/amazon/ec2_asg_facts.py index 631677f138..857d0c20a0 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_asg_facts.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_asg_facts.py @@ -302,7 +302,7 @@ def find_asgs(conn, module, name=None, tags=None): name_prog = re.compile(r'^' + name) for asg in asgs['AutoScalingGroups']: if name: - matched_name = name_prog.search(asg['auto_scaling_group_name']) + matched_name = name_prog.search(asg['AutoScalingGroupName']) else: matched_name = True