# Deactivate IAM user in AWS

> A Slack request disables a departing employee’s AWS console sign-in and deactivates their IAM access keys.

Source: https://stepwork.com/marketplace/deactivate-iam-user-in-aws

Automatically deactivate a departing employee’s IAM user in AWS from a Slack request with Stepwork. Disable console sign-in and deactivate every active access key.

**Apps:** AWS
**Starts with:** Slack request
**Use case:** Employee offboarding
**Best for:** Cloud Administrator, IT Manager
**Applications used:** AWS, Slack
**Business outcome:** Risk reduction

## They’ve left. Their AWS keys still work.

IAM has no single switch that turns a user off. An admin has to disable the console password and then deactivate each access key, and on a busy offboarding day the second half is easy to miss.

A forgotten access key keeps working from any laptop or script, with the same reach into production it had the day before. Nobody records when cloud access ended, so the audit question has no answer.

## Console and key access both end

Stepwork disables console sign-in and deactivates every active access key on the IAM user. The user stays in place for the audit trail, and the run records who asked and when each change was made. It is the cloud step of employee offboarding, done in the right order.

- Console sign-in is disabled.
- Every active access key is deactivated, not deleted.
- The run stops if no IAM user has that name.

## From Slack request to deactivated IAM user

A teammate posts the request in Slack. Stepwork turns off the user’s access in the IAM console, in the same order every time.

1. **Request it in Slack** (Slack): A teammate posts the departing employee’s IAM user name in the offboarding channel. That message starts the flow, and Stepwork records who asked and when.
2. **Find the IAM user** (AWS): Stepwork signs in to the AWS console with a credential read from 1Password at run time and opens the IAM user with that exact name. If there is no match, the run stops instead of guessing.
3. **Disable console sign-in** (AWS): On the user’s security credentials, Stepwork turns off console access. The password no longer signs them in.
4. **Deactivate access keys** (AWS): Stepwork deactivates each active access key, so scripts and command-line tools using them stop working. Then it confirms both changes and replies in Slack.

## Both halves, every departure

A deterministic agent runs both steps on every departure: console access, then access keys. It does not skip the keys when the request only mentions the console, and it stops if the user name matches nobody.

## Questions

**Q: How do I deactivate an IAM user in AWS automatically?**
Post the IAM user name in Slack. Stepwork disables console sign-in and deactivates every active access key, then replies with the result.

**Q: Does this delete the IAM user?**
No. The user and its keys stay in place, deactivated, so the history remains for audits. A deactivated key can be turned back on if needed.

**Q: What about people who sign in through IAM Identity Center?**
Those are separate from IAM users. A different flow removes the user from Identity Center.

---

This is the Markdown version of https://stepwork.com/marketplace/deactivate-iam-user-in-aws, built from the same copy as the page. Everything about Stepwork for AI tools: https://stepwork.com/llms.txt. Book a demo: https://calendly.com/shaun-maclellan/1-1-w-shaun-stepwork
