

# access-keys-rotated
<a name="access-keys-rotated"></a>

Checks if active IAM access keys are rotated (changed) within the number of days specified in `maxAccessKeyAge`. The rule is NON\$1COMPLIANT if access keys are not rotated within the specified time period. The default value is 90 days.

**Warning**  
Do not provide your access keys to unauthorized parties, even to help [find your account identifiers](https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html). By doing this, you might give someone permanent access to your account. The security [best practice](https://docs.aws.amazon.com/accounts/latest/reference/best-practices.html) is to remove passwords and access keys when users no longer need them.

**Note**  
**Resource Type Marked as Noncompliant in the Console**  
If this rule finds that any of your access keys are noncompliant, the `AWS::IAM::User` resource type will also be marked as noncompliant in the Amazon console.  
**Managed Rules and Global IAM Resource Types**  
The global IAM resource types onboarded before February 2022 (`AWS::IAM::Group`, `AWS::IAM::Policy`, `AWS::IAM::Role`, and `AWS::IAM::User`) can only be recorded by Amazon Config in Amazon Regions where Amazon Config was available before February 2022. These resource types cannot be recorded in Regions supported by Amazon Config after February 2022. For a list of those Regions, see [Recording Amazon Resources \$1 Global Resources](https://docs.amazonaws.cn/config/latest/developerguide/select-resources.html#select-resources-all).  
If you record a global IAM resource type in at least one Region, periodic rules that report compliance on the global IAM resource type will run evaluations in all Regions where the periodic rule is added, even if you have not enabled the recording of the global IAM resource type in the Region where the periodic rule was added.  
To avoid unnecessary evaluations, you should only deploy periodic rules that report compliance on a global IAM resource type to one of the supported Regions. For a list of which managed rules are supported in which Regions, see [List of Amazon Config Managed Rules by Region Availability](https://docs.amazonaws.cn/config/latest/developerguide/managing-rules-by-region-availability.html).  
**Limitations**  
This rule does not apply to Amazon account root user access keys. To delete or rotate your root user access keys, use your root user credentials to sign in to the My Security Credentials page in the Amazon Web Services Management Console at [https://aws.amazon.com/console/](https://aws.amazon.com/console/).



**Identifier:** ACCESS\$1KEYS\$1ROTATED

**Resource Types:** AWS::IAM::User

**Trigger type:** Periodic

**Amazon Web Services Region:** All supported Amazon regions except Asia Pacific (New Zealand), Asia Pacific (Thailand), Middle East (UAE), Asia Pacific (Hyderabad), Asia Pacific (Malaysia), Asia Pacific (Melbourne), Mexico (Central), Israel (Tel Aviv), Asia Pacific (Taipei), Canada West (Calgary), Europe (Spain), Europe (Zurich) Region

**Parameters:**

maxAccessKeyAgeType: intDefault: 90  
Maximum number of days without rotation. Default 90.

## Amazon CloudFormation template
<a name="w2aac20c16c17b7b1c23"></a>

To create Amazon Config managed rules with Amazon CloudFormation templates, see [Creating Amazon Config Managed Rules With Amazon CloudFormation Templates](aws-config-managed-rules-cloudformation-templates.md).