[bug report] I think this is an IAM bug.

0

Proceed as follows:

STEP 1 : create an inline policy

  • Name : test
  • Policy : ELB

STEP 2 : Declare differenct policies with the same name

  • Name : test
  • Policy : API Gateway

STEP 3 : Confirm that the existing policy has disappeard

  • Name : test
  • Policy : API Gateway

You can see that the existing test/ELB poilcies have disappeared

In places other than inline-policy, duplicate declarations are prohibited.

In this regard, I thought it was a bug and contacted the customer center, and the customer center told me to contact me here.
Isn't it a bug to delete an existing policy from an inline policy?

I also got a response that it's not a bug to use the API like this: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html
I think that things that are deleted from the web should be eliminated even if it is not at the API level.

cand0
asked a year ago298 views
1 Answer
1

Hello, The behaviour observed here is an expected behaviour by design. When adding another inline policy to an IAM identity, ensure that the policy name is unique. If the new inline policy uses the same name as an existing inline policy, the new policy will overwrite the existing policy.

We have received feedback from our customers in regard to this behaviour and there's an already created feature request to improve the behaviour in future.

profile pictureAWS
SUPPORT ENGINEER
Varun
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions