# Deactivate access keys for user in AWS

> A Slack request finds a user’s active IAM access keys in AWS and deactivates them, ending programmatic access.

Source: https://stepwork.com/marketplace/deactivate-access-keys-for-user-in-aws

Automatically deactivate a user’s IAM access keys in AWS from a Slack request with Stepwork. Find every active key and deactivate it, ending programmatic access.

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

## Old keys outlive the people who made them.

Access keys sit in scripts, laptops, and config files long after anyone remembers them. They keep working until someone deactivates them in IAM.

Most keys are only looked at during a security review, and by then a leaked or forgotten key has had months to be used. Turning one off by hand means finding the user, opening their credentials, and checking each key.

## Programmatic access ends, and the keys are kept

Stepwork deactivates every active access key on the user. Anything signing requests with those keys stops working. The keys are deactivated, not deleted, so one can be turned back on if a service turns out to need it.

- Every active key on the user is deactivated.
- Keys are kept, so they can be reactivated.
- The Slack reply lists each key that was turned off.

## From Slack request to deactivated keys

A teammate posts the request in Slack. Stepwork deactivates the keys on the user’s security credentials in the IAM console.

1. **Request it in Slack** (Slack): A teammate posts the IAM user name in the security channel. That message starts the flow, and Stepwork records who asked and when.
2. **Find the user** (AWS): Stepwork signs in to the AWS console, opens IAM, and finds the user with that exact name. If there is no match, the run stops instead of guessing.
3. **Deactivate each active key** (AWS): On the user’s security credentials, Stepwork deactivates every key marked Active. An IAM user can have up to two.
4. **Confirm and reply in Slack** (AWS): Stepwork checks that no key on the user still reads Active, then posts the IDs of the keys it turned off in Slack.

## Only the status changes

Credentials stay in 1Password. Stepwork signs in to the AWS console with a vault reference and changes only the status of keys that read Active. It never creates, deletes, or reads a secret key.

## Questions

**Q: How do I deactivate AWS access keys automatically?**
Post the IAM user name in Slack. Stepwork opens the user’s security credentials in IAM and deactivates every active key.

**Q: Can a deactivated key be turned back on?**
Yes. Deactivating keeps the key. An admin can make it active again in IAM, or delete it later.

**Q: Does this also turn off console sign-in?**
No. Only the access keys change. To end both, deactivate the IAM user.

---

This is the Markdown version of https://stepwork.com/marketplace/deactivate-access-keys-for-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
