IAM: raise error if requiested instance profile does not exist (#802)

Signed-off-by: Andrew Harris <andrew.harris@getbraintree.com>
This commit is contained in:
Jesse Szwedko 2017-01-18 18:36:50 -08:00 committed by Steve Pulec
commit d42432bfef
2 changed files with 10 additions and 0 deletions

View file

@ -501,6 +501,8 @@ class IAMBackend(BaseBackend):
if profile.name == profile_name:
return profile
raise IAMNotFoundException("Instance profile {0} not found".format(profile_name))
def get_instance_profiles(self):
return self.instance_profiles.values()