IAM - Add Validation on duplicate policy names
This commit is contained in:
parent
422bca8e90
commit
85570f0abe
2 changed files with 17 additions and 1 deletions
|
|
@ -820,7 +820,7 @@ class IAMBackend(BaseBackend):
|
|||
)
|
||||
if policy.arn in self.managed_policies:
|
||||
raise EntityAlreadyExists(
|
||||
"A policy called {} already exists. Duplicate names are not allowed.".format(
|
||||
"A policy called {0} already exists. Duplicate names are not allowed.".format(
|
||||
policy_name
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue