Skip to main content

Remediation

From Consoleโ€‹

  1. Sign in to the AWS Management Console and navigate to IAM dashboard at https://console.aws.amazon.com/iam/.
  2. In the left navigation panel, choose Users.
  3. Click on the IAM user name that you want to examine.
  4. On the IAM user configuration page, select the Security Credentials tab.
  5. In the Access Keys section, choose one access key that is less than 90 days old. This should be the only active key used by this IAM user to access AWS resources programmatically. Test your application(s) to make sure that the chosen access key is working.
  6. In the same Access Keys section, identify your non-operational access keys (other than the chosen one) and deactivate them by clicking Make Inactive.
  7. If you receive the Change Key Status confirmation box, click Deactivate to switch off the selected key.
  8. Repeat steps no. 3-7 for each IAM user in your AWS account.

From Command Lineโ€‹

  1. Using the IAM user and access key information provided in the Audit CLI, choose one access key that is less than 90 days old. This should be the only active key used by this IAM user to access AWS resources programmatically. Test your application(s) to make sure that the chosen access key is working.

  2. Run the update-access-key command below using the IAM user name and the non-operational access key IDs to deactivate the unnecessary key(s). Refer to the Audit section to identify the unnecessary access key ID for the selected IAM user:

    Note: the command does not return any output:

    aws iam update-access-key --access-key-id {{access-key-id}} --status Inactive --user-name {{user-name}}
  3. To confirm that the selected access key pair has been successfully deactivated, run the list-access-keys audit command again for that IAM user:

    aws iam list-access-keys --user-name {{user-name}}
    • The command output should expose the metadata for each access key associated with the IAM user. If the non-operational key pair(s) Status is set to Inactive, the key has been successfully deactivated and the IAM user access configuration now adheres to this recommendation.
  4. Repeat steps no. 1-3 for each IAM user in your AWS account.