Information
AWS IAM users can access AWS resources using different types of credentials, such as passwords or access keys. It is recommended that all credentials that have been unused for 45 days or more be deactivated or removed.
Disabling or removing unused credentials reduces the window of opportunity for credentials associated with a compromised or abandoned account to be used.
Solution
From Console:
Perform the following to deactivate or remove unused credentials:
- Login to the AWS Management Console and open the IAM console
- Click on the User
- Select the user
- Click Security Credentials
Disable Console Access:
- In the Console sign-in section, select Manage console access
- If Console last sign-in is greater than 45 days, select Disable access
Deactivate or Delete Access Keys:
- In the Access keys section:
- Deactivate unused keys, or
- Delete keys that are no longer required
From Command Line:
- Delete unused access keys:
aws iam delete-access-key --access-key-id <access-key-id> --user-name <user-name>
- Remove console access:
aws iam delete-login-profile --user-name <user-name>
Impact:
Disabling or removing unused credentials reduces the window of opportunity for credentials associated with a compromised or abandoned account to be used.