# Delete Role

> `UiPath.AmazonWebServices.Activities.DeleteRole`

`UiPath.AmazonWebServices.Activities.DeleteRole`

## Description

Deletes the specified IAM role.

## Project compatibility

Windows - Legacy | Windows | Cross-platform

## Configuration

### Input

* **Name** - The name of the IAM role to delete.
* **RemoveAllAttachedEntities** - Indicates whether to remove all entities attached to the role, i.e. delete all inline policies embedded in the role, detach all associated managed policies and instance profiles.
* **DeleteDefaultInstanceProfile** - Indicates whether to delete the default instance profile associated with the role.

:::important
* If option
`RemoveAllAttachedEntities` is selected, the activity removes all entities attached to the role, i.e. deletes all inline policies embedded in the role, and detaches all associated managed policies and instance profiles. If this option is not selected and there are still entities attached to the role, the deletion will fail.
* If
`DeleteDefaultInstanceProfile` is checked, the default instance profile will be deleted in case it is still attached to the role or there is no other role attached to it.
* Make sure that you do not
have any Amazon EC2 instances running with the role you are about to delete. Deleting a role or the instance profile that is associated with a running instance will break any applications running on the instance.
:::
