Merge pull request #5236 from willthames/ec2_inv_rds_fail_safe

ec2 inventory: Fail EC2 inventory better with restricted EC2 users
This commit is contained in:
jctanner 2014-01-06 12:57:21 -08:00
commit 57d54c1da5

View file

@ -298,9 +298,10 @@ class Ec2Inventory(object):
for instance in instances:
self.add_rds_instance(instance, region)
except boto.exception.BotoServerError as e:
print "Looks like AWS RDS is down: "
print e
sys.exit(1)
if not e.reason == "Forbidden":
print "Looks like AWS RDS is down: "
print e
sys.exit(1)
def get_instance(self, region, instance_id):
''' Gets details about a specific instance '''