5

I have a Fargate instance running on port 3000. For this service "Service Discovery" is enabled, and corresponding hosted zone is created in Route 53. I have added name servers from this hosted zone in my domain registrar(GoDaddy) DNS setting.

I want to route all traffic from my domain to this Fargate instance. Currently, I don't see a need to add an ALB since the traffic is very little and routing is simple. So I want to know the following

  1. Is it possible to route my traffic from Route 53 to the Fargate instance running on port 3000 without an ALB? If Yes, how can I do it?
  2. Is ALB required for configuring SSL? Or I can do it without an ALB?
Meena Chaudhary
  • 9,909
  • 16
  • 60
  • 94

1 Answers1

2

See this article under the heading External Networking.

TL;DR is to create a VPC with a public subnet and an attached IP address via an internat gateway, and ensure your Fargate cluster/task is running in that VPC.

If you want to run SSL without a load balancer (which one of it's responsibilities can be for terminating SSL, you will need to terminate the SSL certificates yourself from your Fargate task.

tobbbles
  • 21
  • 1
  • 3
    Yes and no. A Fargate task (and its public IP) is ephemeral. If your task dies (and ECS restarts it because it's part of an ECS service) your app will come back up but with a different IP address. If you are ok with this and tweaking the R53 entry fine. Otherwise an ALB gives you a stable endpoint. I'd also add that you don't need to enable service discovery because SD is only used as a way for ECS tasks to know/reach other ECS tasks (as a way to avoid having to use internal ALBs for this). – mreferre Aug 06 '21 at 12:28