# How to delete aws user?

**URL:** <https://forum.ansible.com/t/how-to-delete-aws-user/29254>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [December 13, 2018, 5:52am UTC](https://forum.ansible.com/t/how-to-delete-aws-user/29254 "2018-12-13T05:52:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![istisno](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@istisno](https://forum.ansible.com/u/istisno)\
**Post date:** [December 13, 2018, 5:52am UTC](https://forum.ansible.com/t/how-to-delete-aws-user/29254/1 "2018-12-13T05:52:57Z")

</div>

I’m trying to delete aws user like this:

- name: Delete AWS users

```auto
  iam:
    name: userName
    iam_type: user
    state: absent

```

It gives following error:

Failed to delete login profile: BotoServerError: 404 Not Found  
  
  
Sender  
`NoSuchEntity`  
Login Profile for User XXXX cannot be found.  
  
asdfsdf-fe98-11e8-23fr-035cerw9269a

If I try to delete with “iam\_user”, it says “Delete first user access keys”. How can I delete aws user?

---

<div class="post-metadata">

**Author:** ![istisno](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@istisno](https://forum.ansible.com/u/istisno)\
**Post date:** [December 13, 2018, 9:07am UTC](https://forum.ansible.com/t/how-to-delete-aws-user/29254/2 "2018-12-13T09:07:46Z")

</div>

I found out that I was using older ansible version v2.6.2. This is fixed in later version of ansible.  
Now I’ve updated to latest ansible v2.7.4 version and deleting AWS user is working.  
I can delete like this:

```auto
- name: Absent iam user
      iam:
        iam_type: user
        state: absent
        name: username

```

So, this is resolved.
