We are migrating from ECS to Fargate. In ECS, we could set the hostname in the task definition like this:
"hostname": "%HOST_NAME%"
It fails to create with the error 'hostname is not supported on container when networkMode=awsvpc' Is there any way to set hostname ?
AWS documentation says The hostname parameter is not supported if using the awsvpc networkMode.
Anything but awsvpc is not supported with FARGATE, therefore there is no way to set hostname in task definition with FARGATE launch type.