Regarding IAM role

0

If i delete an iam role without terminating instances under that IAM role. will the instances running on it automatically deleted once we delete the iam role or whether it will be present somewhere else.

profile picture
질문됨 일 년 전292회 조회
2개 답변
0
수락된 답변

Hi

No, it will not terminate the instance. But, deleting a role or instance profile that is associated with a running instance will break any applications that are running on the instance.

Hence its recommended to secure an application downtime [on the affected EC2 instance], detach the IAM role from the instance profile, attach a new IAM role to the instance profile and then delete the old IAM role.

For further reading: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html

Also, Instances do not run under an IAM user. IAM only specifies how users/groups/roles get access to AWS Resources/Services. The services/resources, EC2 in this example will have no effect if some user/group/role doesn't have access to manage it.

Thanks

profile pictureAWS
Rama
답변함 일 년 전
  • sorry to say that there is a correction in aforementioned question. i meant that IAM user not IAM role. if i delete an IAM user without terminating instances running under that IAM user will it be automatically terminated or not. or do we need to terminate the instance first and then only we can proceed with the IAM user deletion.

  • Thanks for your response

0

Deleting an IAM role used by an EC2 instance does not make the EC2 instance disappear.
You will not be moved anywhere, but since the IAM role will disappear, you will not be able to perform AWS operations that you were able to perform from the EC2 instance.

profile picture
전문가
답변함 일 년 전
  • sorry to say that there is a correction in aforementioned question. i meant that IAM user not IAM role. if i delete an IAM user without terminating instances running under that IAM user will it be automatically terminated or not. or do we need to terminate the instance first and then only we can proceed with the IAM user deletion.

  • Deleting an IAM user does not terminate EC2.

  • Instances do not run under an IAM user. IAM only specifies how users/groups/roles get access to AWS Resources/Services. The services/resources, EC2 in this example will have no effect if some user/group/role doesn't have access to manage it.

  • Thanks for your response.Rama&Riku_Kobayashi

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠