From eceabec71fb15b528837955824100aed86d01a46 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 9 Mar 2016 00:40:14 -0500 Subject: [PATCH] page rds instances fix #14861 --- contrib/inventory/ec2.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index 405868ac84e..da28234787b 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -498,9 +498,14 @@ class Ec2Inventory(object): try: conn = self.connect_to_aws(rds, region) if conn: - instances = conn.get_all_dbinstances() - for instance in instances: - self.add_rds_instance(instance, region) + marker = None + while True: + instances = conn.get_all_dbinstances(marker=marker) + marker = instances.marker + for instance in instances: + self.add_rds_instance(instance, region) + if not marker: + break except boto.exception.BotoServerError as e: error = e.reason