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
質問済み 1年前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
回答済み 1年前
  • 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
エキスパート
回答済み 1年前
  • 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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ