Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Amazon Web Services Foundations v7.0.0 · 2.11

IAM credentials that have been unused for 45 days or more should be disabled

  • Level 1

This check looks at the console passwords and access keys of IAM users and when each was last used. The safe setting is that any credential unused for 45 days or more is disabled.

Why it matters

A credential nobody uses is a credential nobody watches. If a forgotten password or access key leaks, there is no daily activity that would make the misuse stand out, and it keeps working until someone removes it. Disabling credentials that have sat idle shrinks the number of ways into the account.

AWS recommends finding and removing unused IAM credentials as part of good credential hygiene. See Find unused credentials in the AWS IAM documentation. People who left the company, test users and old automation are the usual owners of idle credentials.

How to check it yourself

In the console open IAM, Users, and look at the Console last sign-in and Access key last used columns. For a full list, use the credential report, which holds the last-used date of each password and each access key.

aws iam generate-credential-report
aws iam get-credential-report --query Content --output text | base64 --decode \
  | cut -d, -f1,5,11,16
# columns: user, password_last_used, access_key_1_last_used_date, access_key_2_last_used_date

# one key in detail
aws iam get-access-key-last-used --access-key-id AKIAEXAMPLEKEYID

These commands only read data. Compare each date with today and list the ones older than 45 days. Run read-only commands on a test environment or with a read-only role first.

How to fix it

For an access key, open IAM, Users, the user, Security credentials, and set the key to Inactive. Inactive is reversible, so it is a safer first step than deleting. For a console password, remove it, or leave it and ask the user to sign in only if they still need access.

# make a key inactive (reversible)
aws iam update-access-key --user-name EXAMPLE-USER \
  --access-key-id AKIAEXAMPLEKEYID --status Inactive

# remove a console password (the user must get a new one later)
aws iam delete-login-profile --user-name EXAMPLE-USER

These commands change your account, so you run them. ConfigCobra stays read-only. Once a user is confirmed gone, delete the user and its keys for good.

What changes when you fix it

The affected identities are IAM users with a password or access key idle for 45 days or more. Nothing changes for people who sign in regularly.

  • Automation that runs rarely, such as a quarterly or year-end job, will start failing when its key becomes inactive. Check the owner before you disable it.
  • An emergency or break-glass user can look idle by design. Decide on an exception and keep it documented rather than disabling it by accident.
  • Someone returning from long leave will need an administrator to re-enable a key or reset a password.

Setting a key to Inactive and watching for complaints for a short time is a cheap way to find forgotten dependencies before deleting.

Included in

BenchmarkCIS IDProfile
CIS Amazon Web Services Foundations v7.0.02.11Level 1

Check this on your AWS

ConfigCobra runs this check with every other control of the CIS Amazon Web Services Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial