Hi.
I am trying to launch a service in ECS with my Docker image.
I have successfully started it as a task, but without a domain name. Tried accessing it only by IP.
Now I am trying to create it as a service. Again without an attached domain name, it works. However to attach a domain name I need to use ELB and that is when it becomes complicated.
Step 1 config.:
Launch type: FARGATE
No. of tasks: 1
Deployment type: Rolling update.
The rest are by default.
Step 2:
Cluster VPC: existing one
Subnets: private
Security groups: created one for ECS
Auto-assign public IP: disabled
Load balancer type: Application
Load balancer name: choosing existing one
Container name port: existing one on port 80
Enable service integration: checked
and choosing a configured service from there.
and when I click next step, the field "Container name port" becomes red with an error "Please configure a container with elb.".
And that is when I do not know what to do next.
I have checked the rules in ELB and there is one configured on port 80, which points the target group by the host name.
The target group exists. However it does not have any targets. Which seems to be fine.
In Route53 a private zone is created and the domain name is being created automatically when I try to create a service. So this also seems to work.
The IAM role for the service has following policies attached:
AWSApplicationDiscoveryServiceFullAccess
AmazonECSTaskExecutionRolePolicy
ElasticLoadBalancingReadOnly
ReadSecrets
I have tried adding
ElasticLoadBalancingFullAccess
AmazonRoute53FullAccess
but without any luck.
Can you please advice what else to check that my be causing this issue?