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
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.
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 promptFind the stale ones.
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 promptPlan what replaces them.
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 promptA 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.
For Kit, the platform engineer. From AWS IAM. Nothing is posted or changed until Kit approves it.
- Post the key list in the platform channelUsers, last 4 characters, age and last use. No full key IDs
- Ask Sage and the 2 other users to confirm their old keysIn the platform channel, by Wednesday
- Create a task for Kit to move backup-script to a roleIn the Platform project, with the services it actually uses
- Deactivate the 7 keysLeft unticked: Kit deactivates them in IAM, and deletes them in December if nothing breaks
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.