> 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-ecs-services-have-automatic-public-ip-address-assignment-enabled.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS ECS services have automatic public IP address assignment enabled

### Synopsis

| Field               | Value                                                                |
| ------------------- | -------------------------------------------------------------------- |
| Rule Type           | Detection                                                            |
| Finding Type        | AWS ECS services have automatic public IP address assignment enabled |
| Finding ID          | 60000816                                                             |
| Generates a Finding | This detection rule also generates a finding                         |
| Severity            | Informational                                                        |
| Category            | CONFIGURATION                                                        |
| Cloud Providers     | AWS                                                                  |
| Platform Module     | CSPM                                                                 |
| Asset Types         | ECS\_SERVICE                                                         |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                      |
| ATT\&CK Technique   | T1685 (T1685)                                                        |

### Description

Amazon ECS services with automatic public IP assignment enabled expose services to the internet, increasing the risk of unauthorized access and attacks. This misconfiguration allows attackers to directly access the service without traversing any security controls.

The Amazon ECS service's setting for automatic public IP assignment controls whether launched tasks receive public IP addresses. Disabling this feature prevents unintended internet exposure of ECS tasks. Failing to disable automatic public IP assignment exposes services to various threats including unauthorized access, data breaches, and denial-of-service attacks from untrusted IPs.

The impact of this misconfiguration is significant; it exposes sensitive data and applications to the internet, leading to potential data breaches, service disruptions, and reputational damage. Restricting public IP assignments to only necessary services enhances the security posture and minimizes the attack surface.

To mitigate this risk, disable automatic public IP assignment for all non-publicly facing ECS services. Regularly review and audit ECS configurations to ensure adherence to the least privilege principle. Only enable public IP assignment for services explicitly requiring external access, and employ robust security measures like network segmentation and web application firewalls.

### Remediation

**Manual steps:**

ECS Service - Manual remediation steps:

To modify a disable auto-assign public IP for an ECS Service:

1. Use the AWS CLI console or AWS API, as you cannot update network configurations for an ECS Service using the AWS Management Console.
2. Run update-service command in AWS CLI to disable auto-assign public IP for an ECS Service

   ```
   aws ecs update-service --cluster <ECS Cluster Name> --service <ECS Service Name> --network-configuration "awsvpcConfiguration={subnets=[string, string],securityGroups=[string, string],assignPublicIp=DISABLED}"
   ```

Please Refer to the below URL:

<https://docs.aws.amazon.com/cli/latest/reference/ecs/update-service.html>


---

# 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-ecs-services-have-automatic-public-ip-address-assignment-enabled.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.
