> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-kms-customer-managed-external-key-expiring-in-30-days-or-less.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS KMS customer managed external key expiring in 30 days or less

### Synopsis

| Field               | Value                                                             |
| ------------------- | ----------------------------------------------------------------- |
| Rule Type           | Detection                                                         |
| Finding Type        | AWS KMS customer managed external key expiring in 30 days or less |
| Finding ID          | 60000168                                                          |
| Generates a Finding | This detection rule also generates a finding                      |
| Severity            | Informational                                                     |
| Category            | CONFIGURATION                                                     |
| Cloud Providers     | AWS                                                               |
| Platform Module     | CSPM                                                              |
| Asset Types         | AWS\_KMS\_KEY\_ROTATION\_STATUS                                   |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                   |
| ATT\&CK Technique   | T1685 (T1685)                                                     |

### Description

AWS KMS customer-managed external keys expiring within 30 days pose a significant security risk. Failure to renew these keys before expiration renders them unusable, disrupting services dependent on them.

AWS KMS manages customer-managed external keys, allowing for external key material import. Improper key management, such as failing to renew expiring keys, results in data encryption key unavailability, leading to service outages and potential data loss. Attackers could exploit this unavailability to gain unauthorized access or disrupt operations.

The impact of this misconfiguration is service disruption and potential data loss. Data encrypted with the expired key becomes inaccessible. Regular key rotation is crucial for maintaining data confidentiality and operational resilience. It mitigates risks associated with compromised keys and improves overall security posture.

To mitigate this, implement a robust key management process including automated renewal of expiring keys. Configure alerts for upcoming key expirations, at least 30 days prior. Regularly review and update your key management policies to ensure all keys are appropriately managed and rotated before expiration.

### Remediation

**Manual steps:**

AWS KMS Key Rotation Status - Manual remediation steps:

1. Sign into the AWS console
2. In the console, select the specific region from region drop down on the top right corner, for which the alert is generated
3. Navigate to Key Management Service (KMS) Dashboard
4. Click on Customer managed keys (Left Panel)
5. Click on reported KMS Customer managed key
6. Under 'Key material' section, Delete the existing key material before you reimport the key material by clicking on 'Delete key material'
7. Click on 'Upload key material'
8. Under 'Encrypted key material and import token' section, Reimport same encrypted key material and import token
9. Under 'Expiration option', Select 'Key material expires' and choose new expiration date in 'Key material expires at' date box
10. Click on 'Upload key material' button

NOTE: Deleting key material makes all data encrypted under the customer master key (CMK) unrecoverable unless you later import the same key material into the CMK. The CMK is not affected by this operation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-kms-customer-managed-external-key-expiring-in-30-days-or-less.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
