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
feita há um ano292 visualizações
2 Respostas
0
Resposta aceita

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
respondido há um ano
  • 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
ESPECIALISTA
respondido há um ano
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas