ECS task definitions should not use host network mode
Flags the latest active revision of ECS task definitions that use host network mode, which shares the host's network namespace with the container.
- service
- ECS
- severity
- Medium
- scope
- evaluated in every region
How to fix it
To ensure ECS task definitions don't use host network mode, configure the network mode to use bridge, awsvpc, or none instead of host.
- Navigate to the Amazon ECS console
- Select your task definition
- Choose 'Edit' and go to the 'Networking' section
- Change the 'Network mode' from 'host' to 'bridge', 'awsvpc', or 'none'
- Update any port mappings if necessary
- Save the task definition with the new network configuration
See which of your accounts this check is failing on.
Book a demo