diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index 5f7bd061d7..e93df1053d 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -382,6 +382,8 @@ class Ec2Inventory(object): for instance in instances: self.add_rds_instance(instance, region) except boto.exception.BotoServerError, e: + error = e.reason + if e.error_code == 'AuthFailure': error = self.get_auth_error_message() if not e.reason == "Forbidden":