The Fargate service template defines a service, task definition, load balancer listener, load balancer target group, and a CloudWatch log group. The service and task definition are necessary resources that tell the ECS cluster that we want to launch a service, how many instances of the service we want to launch, networking configuration, and some other configuration for the service. The task definition defines what the service will be running. Configuration for container definitions in the task definition includes where to find the Docker image, logging configuration, environment configuration, and other container level configuration that could be found in a `docker-compose` file. The task definition also includes some compute level configuration and defines IAM roles to be used. The load balancer listener tells the load balancer what port to listen on and to forward that traffic on to the target group, which finally forwards traffic to our container. It's worth mentioning that there is much more logic that can be built into load balancer listeners, and my configuration is simple by design.
0 commit comments