Description
AWS Config’s ACCESS_KEYS_ROTATED evaluates whether active IAM user keys have been rotated within the specified age. Rotation and deactivation are separate operations.
Potential impact
Even an old or unused key can be misused if it remains active and its credentials are exposed.
Remediation
Prefer temporary role credentials. If your organization limits long-term keys to 90 days, set maxAccessKeyAge to 90 or less. To rotate a key, switch its consumers to replacement credentials, test them, deactivate the old key, and verify normal operation before deleting it.
Examples
Configure AWS Config separately. The rule excludes root user keys.
Before
Resources:
ConfigRule:
Type: AWS::Config::ConfigRule
Properties:
ConfigRuleName: access-keys-rotated
InputParameters:
maxAccessKeyAge: 100
Source:
Owner: AWS
SourceIdentifier: ACCESS_KEYS_ROTATED
MaximumExecutionFrequency: TwentyFour_Hours
maxAccessKeyAge: 100 sets a 100-day threshold.
After
Resources:
ConfigRule:
Type: AWS::Config::ConfigRule
Properties:
ConfigRuleName: access-keys-rotated
InputParameters:
maxAccessKeyAge: 90
Source:
Owner: AWS
SourceIdentifier: ACCESS_KEYS_ROTATED
MaximumExecutionFrequency: TwentyFour_Hours
The threshold changes to 90 days. Both examples use the TwentyFour_Hours evaluation schedule.