All checks
Medium ECS · regional

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.

  1. Navigate to the Amazon ECS console
  2. Select your task definition
  3. Choose 'Edit' and go to the 'Networking' section
  4. Change the 'Network mode' from 'host' to 'bridge', 'awsvpc', or 'none'
  5. Update any port mappings if necessary
  6. Save the task definition with the new network configuration

See which of your accounts this check is failing on.

Book a demo