> 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/compute/appsec-aws-332.md).

# ECS Fargate services are not ensured to run on the latest Fargate platform version misconfiguration

## Rule Details

|                        |                                         |
| ---------------------- | --------------------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_AWS\_332                        |
| Category - Subcategory | Compute - Unsanctioned Resource Or Type |
| Provider               | AWS                                     |
| Severity               | MEDIUM                                  |
| Framework              | Terraform, Terraform Plan               |

## Impact

This rule is checking to ensure that Amazon Elastic Container Service (ECS) Fargate services are running on the most recent Fargate platform version. Not using the latest version of any software or platform can expose the system to several security vulnerabilities, as older versions may lack critical security patches and updates. Also, staying updated with the latest Fargate platform ensures you benefit from the improved performance, new features, and bug fixes provided by AWS in newer releases.

## How to Fix

*Resource:* aws\_ecs\_service

* *Arguments:* launch\_type

To fix this issue, the ECS Fargate service task definition must be configured to use the latest Fargate platform version. A sample is shown below:

## The "LATEST" value for the 'platform\_version' configuration makes sure that the ECS Fargate service always use the latest Fargate platform version. This adoption of the latest version increases the security level of your infrastructure due to the newer versions always having fixes to vulnerabilities and enhancements in security configurations. \[source,go]

resource "aws\_ecs\_service" "example" { name = "example" cluster = aws\_ecs\_cluster.example.id task\_definition = aws\_ecs\_task\_definition.example.arn launch\_type = "FARGATE"

network\_configuration { assign\_public\_ip = false subnets = \["subnet-abcde012", "subnet-bcde012a"] security\_groups = \[aws\_security\_group.example.id] }

## platform\_version = "LATEST" }


---

# 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/compute/appsec-aws-332.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.
