when I enable Auto-configure CloudWatch Logs
a warning about Network mode appears, it says Your containers in the task will share an ENI using a common network stack. Port mappings can only specify container ports (any existing host port specifications will be removed).
This is the warning that appears, I don't understand what that means
I don't think this has anything to do with the logging configuration. This has to do more with the networking option you picked (
awsvpc
). When you select that you are basically landing your task right inside the VPC and the task will get a VPC ip address. In other words there is no docker host natting where you expose the port80
of your nginx container on port12345
of the host. The warning is just saying that you need to make sure all your containers in the task do not overlap ports because they are reachable as-is on the VPC ip address assigned to the task. Note thatawsvpc
is the only networking mode supported on Fargate (because with Fargate there is not host anyway). See here for background on ECS networking modes.