Fail EC2 inventory better with restricted EC2 users

If a user has full EC2 access but no RDS access, the user
should still be able to query the EC2 inventory, although
will not obtain any information about any RDS instances.
pull/5236/head
Will Thames 12 years ago
parent 5cd97e8cf6
commit e9a0aff77c

@ -295,6 +295,7 @@ class Ec2Inventory(object):
for instance in instances: for instance in instances:
self.add_rds_instance(instance, region) self.add_rds_instance(instance, region)
except boto.exception.BotoServerError as e: except boto.exception.BotoServerError as e:
if not e.reason == "Forbidden":
print "Looks like AWS RDS is down: " print "Looks like AWS RDS is down: "
print e print e
sys.exit(1) sys.exit(1)

Loading…
Cancel
Save