ECS task definition uses host network mode
- Severity
- Medium
- Service
- ECS
- Check ID
- ECS_HOST_NETWORK_MODE
What this check finds
With networkMode host, the task shares the EC2 instance's network namespace. It reaches the instance metadata service and the instance role's credentials whatever the metadata hop limit, can bind any host port, and sees traffic of the host's other processes. Security groups apply to the instance, not the task.
Passing looks like: No ECS task uses host network mode.
How to fix it
Use the awsvpc network mode (its own network interface and security group) and set ECS_AWSVPC_BLOCK_IMDS=true in the ECS agent configuration, or the bridge mode with the metadata hop limit at 1. Register a new task definition revision and redeploy.
AWS console
ECS → Task Definitions → select definition → Create new revision → Network mode.
Compliance controls it is evidence for
A failing result counts against these controls in KloudLytics; a passing one is evidence towards them. How compliance mapping works
| Framework | Controls |
|---|---|
| NIST SP 800-53 Rev5 (Moderate) |
|
| NIST Cybersecurity Framework 2.0 |
|
| ISO/IEC 27001:2022 Annex A |
|
Checked on every scan
KloudLytics runs this check each time it scans a connected AWS account, through a read-only role, and lists every affected resource with its region. On Pro and Business a fix is written for the specific resource rather than the general case above. The exact access it needs