Check provider logo

IAM user does not have active access keys that have never been used

iam_user_no_setup_initial_access_key

Severitymedium
Serviceiam
by Prowler

IAM users with a console password and active access keys that have last_used as N/A are identified.

This highlights accounts where programmatic credentials exist but have never been exercised.

Risk

Active yet unused access keys expand the attack surface. If exposed, attackers gain programmatic access for unauthorized API calls, causing data exfiltration (confidentiality), unauthorized changes (integrity), and service disruption (availability). Dormant keys also bloat credential inventory, delaying detection and rotation.

Run this check with Prowler CLI

prowler aws --checks iam_user_no_setup_initial_access_key

Recommendation

Apply least privilege to programmatic access:

  • Do not provision access keys by default for console users
  • Prefer IAM roles and temporary credentials
  • Require justification and time-bounded key creation
  • Regularly review usage and disable/delete unused keys
  • Limit to one active key per user and enforce rotation with monitoring

Remediation

CLI

aws iam delete-access-key --user-name <example_resource_name> --access-key-id <example_resource_id>

Native IaC
Terraform
Other
  1. In the AWS Console, go to IAM > Users and select the user.
  2. Open the Security credentials tab.
  3. Under Access keys, find keys with Last used = N/A and Status = Active.
  4. Choose Deactivate or Delete for each such key.
  5. Save changes.

Source Code

Resource Type

AwsIamUser

References