BLUENEXUS INTEGRATIONSHOW-TO

How to find and remove unused AWS IAM access keys

Every AWS account collects access keys. One for a CI tool you replaced last spring. One for a contractor whose project ended. One for a backup script someone wrote in an afternoon, with administrator access because it was quicker. Each still works, and each is a password to your cloud that never expires.

Finding them is a matter of reading IAM: which keys exist, when each was last used, and what the user can do. An AI connected to AWS can pull that together and flag what's stale. Deactivating keys stays with a person, after the owners confirm.

Here's what to look for, three prompts, and how a tutoring company clears seven keys in a week.

What to look for

What to look for

Unused for 90 daysA key nobody has used in three months is rarely missed.
Never usedCreated and forgotten. Often a test or a setup that changed.
Admin with a keyA long-lived key with full access is the one you least want leaked.
People who leftKeys on users for contractors and former staff.

Start with AWS's own tools

IAM's credential report lists every user with their keys, ages and last use, and the IAM console shows each key's last-used date and service. IAM Access Analyzer can report unused access across an organization.

What's left is the decision: which keys go, who needs to confirm, and what replaces the ones still in use.

Do it in Claude or ChatGPT

Connect AWS with our guide to AWS in Claude, ChatGPT and MCP, with a role that can read IAM. All three prompts only read.

List the keys.

1Paste this into Claude or ChatGPT

Using AWS, list every IAM user with access keys. For each key, give the user, the last 4 characters of the key ID, its age, when it was last used and for which service, and whether the user has administrator access. Don't change anything.

Copy prompt

Find the stale ones.

1Paste this into Claude or ChatGPT

Which of these keys haven't been used in 90 days, or were never used? Group them by user, and mark any user on this list of people who've left: [names]. Don't change anything.

Copy prompt

Plan what replaces them.

1Paste this into Claude or ChatGPT

For the keys still in use, which services and regions use them? For each, suggest whether it could move to an IAM role or to sign-in through IAM Identity Center instead. Don't change anything.

Copy prompt

A few things to know:

  • Deactivate, then delete. A deactivated key can be turned back on if something breaks. Wait a few weeks before deleting.
  • Never paste full key IDs. The last four characters are enough to tell keys apart.
  • Roles beat rotation. A key rotated every 90 days is still a long-lived key. Roles and IAM Identity Center use short-lived credentials.
  • Check the AI's own access too. Connect it with short-lived sign-in, not a key of its own.

When a small team shares AWS

On your own, you'd check your own keys. In a company, keys belong to people who've moved teams, tools you've replaced, and scripts with no owner, and the platform engineer is the only one who looks.

Fernleaf Learning, a 50-person online tutoring company in Raleigh, checks its keys in BlueNexus. AWS is connected. On the first Monday of each month, the cloud agent reads IAM users, keys, last use and policies, and flags what's stale for Kit, the platform engineer.

Illustration of the BlueNexus app with example data.

Illustration of the BlueNexus app with example data.

Seven keys haven't been used in at least four months, and the nightly backup script runs with administrator access. The agent prepares the next steps for Kit.

Kit approves. Sage and the other two confirm by Wednesday, and Kit deactivates all seven keys that afternoon. By Friday 13 November, nothing has broken, and backup-script runs from a role with only the access it needs.

Illustration of the BlueNexus app with example data.

For connecting AWS, see AWS in Claude, ChatGPT and MCP. For the team, see a weekly check on who owns each AWS resource. To keep AWS tidy with your team, sign up for BlueNexus.

Questions people ask about AWS and AI

How do I find unused IAM access keys?

Download the IAM credential report, or check each key's last-used date in the IAM console. IAM Access Analyzer can also report unused access across your organization.

Should I delete or deactivate an unused access key?

Deactivate first. If nothing breaks after a few weeks, delete it. A deactivated key can be turned back on; a deleted one can't.

How often should AWS access keys be rotated?

Many teams rotate every 90 days. Better still, replace long-lived keys with IAM roles or sign-in through IAM Identity Center, which use short-lived credentials.

What happens if an AWS access key is leaked?

Anyone with the key can use it until it's deactivated. When Truffle Security re-tested over 10,000 leaked AWS keys in August 2026, about 88% still worked. Deactivate it at once, then check CloudTrail for what it did.

Can AI deactivate IAM access keys?

It can if its permissions allow, but it's safer to have AI find the keys and a person deactivate them, after the owners confirm.

Subscribe to our blog

Product insights, AI and product thinking delivered to your inbox.