This rule requires access keys to be rotated at least every 90 days.
Rule | Ensure access keys are rotated every 90 days or less |
Framework | cis_v150 |
Severity | ✔ Low |
Rule Description
The rule cis_v150 specifies that access keys for users in your environment should be rotated every 90 days or less. Rotating access keys regularly enhances the security of your resources by reducing the potential impact of compromised credentials. This helps protect against unauthorized access and data breaches.
Troubleshooting Steps
If you encounter any issues while implementing this rule, follow these troubleshooting steps:
Necessary Codes
There are no specific codes required for this rule. However, you can use AWS CLI commands to rotate access keys. The following section provides step-by-step instructions on how to rotate access keys using the AWS CLI.
Step-by-Step Guide for Remediation
To remediate this rule and rotate access keys using the AWS CLI, follow the steps below:
aws configure
aws iam list-users
aws iam create-access-key --user-name <User Name or User ID>
AccessKeyId
and SecretAccessKey
displayed as output.Important Note: Remember to store the newly generated access key securely. It is crucial to update any applications or services that are using the old access key with the new one.
aws iam update-access-key --access-key-id <Old Access Key ID> --status Inactive --user-name <User Name or User ID>
aws iam list-access-keys --user-name <User Name or User ID>
By following these steps, you will ensure that access keys are regularly rotated every 90 days or less for the specified users or roles in your AWS environment.