diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py index b52c8846630..92d45f59c54 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py @@ -298,7 +298,8 @@ def find_asgs(conn, module, name=None, tags=None): """ try: - asgs = conn.describe_auto_scaling_groups() + asgs_paginator = conn.get_paginator('describe_auto_scaling_groups') + asgs = asgs_paginator.paginate().build_full_result() except ClientError as e: module.fail_json(msg=e.message, **camel_dict_to_snake_dict(e.response))