> 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/appsec-rules/iac-security/monitoring/appsec-aws-339.md).

# EKS clusters are not running on a supported Kubernetes version misconfiguration detected in code

## Rule Details

|                        |                                  |
| ---------------------- | -------------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_AWS\_339                 |
| Category - Subcategory | Kubernetes - Resource Management |
| Provider               | AWS                              |
| Severity               | HIGH                             |
| Framework              | Terraform, Terraform Plan        |

## Impact

This rule is verifying whether your EKS (Elastic Kubernetes Service) clusters are running on a supported version of Kubernetes. Running your clusters on an unsupported version can lead to potential security risks and compatibility issues. Unsupported versions might not have crucial security patches and updates, making them vulnerable to attacks. Furthermore, the latest features and improvements won't be available, potentially affecting performance and functionality. Thus, this rule helps maintain your systems' security and efficiency.

## How to Fix

*Resource:* aws\_eks\_cluster

* *Arguments:* version

To fix this issue, you need to set the Kubernetes version for the EKS cluster in your Terraform configuration to a version that is currently supported by AWS. For example:

## The above code specifies the Kubernetes version for the EKS cluster as 1.27, which is currently supported. Setting this explicitly ensures that the cluster will not accidentally be created with a version that is not supported by AWS. The "vpc\_config" block specifies the networking configuration for the EKS cluster and is required for its creation. The "role\_arn" attribute specifies the IAM role that EKS uses to perform actions on AWS. \[source,go]

resource "aws\_eks\_cluster" "my\_cluster" { name = "my-cluster" role\_arn = aws\_iam\_role.example.arn

vpc\_config { subnet\_ids = \["${aws\_subnet.example.id}"] }

## version = "1.27" }


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/monitoring/appsec-aws-339.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
