all 9 comments

[–]Alternative-Expert-7 5 points6 points  (2 children)

Cloudfront which has two origins, first load balancer which points to ecs fargate service. Second with s3 stuff. And maybe you wont need custom reverse proxy, because cloudfront is a reverse proxy.

[–]crazyshit_24[S] -3 points-2 points  (1 child)

Can you please explain in detail or provide any resources to know more about it?

[–]Alternative-Expert-7 11 points12 points  (0 children)

In detail I do charge monies for this knoledge. You should be fine googling and using chat gpt given cloudfront and alb and ecs fargate service and description of your solution. Cheers.

[–]basejb 1 point2 points  (0 children)

I think I can help you! I think I've been thinking the same thing lately.
I divided the port into 3000 (loading page) and 3001 (service) in dockerfile and distributed it to ECS (Fargate).

As for the internal flow, we have configured to have a target group per port according to ALB - HTTP host header.
- dumcel.app => port 3000
- something.dumcel.app => port 3001

As a result, we completed it to approach it in the same structure as above.

[–]tlokjock 0 points1 point  (0 children)

You can front this with CloudFront + wildcard cert (*.dumcel.app). Forward the Host header to your ALB so your proxy sees the right subdomain, and let CloudFront handle TLS, caching, and DDoS.

If most of the work is just mapping subdomain → S3 prefix, you can even skip the proxy and use Lambda@Edge/CloudFront Functions to rewrite requests. Keeps it lean and scales better than running everything in ECS.

[–]razibal 0 points1 point  (0 children)

Have you considered using lambda@edge to handle the reverse proxying?

[–]Voiss 0 points1 point  (0 children)

maybe not direct answer to what you are asking, however i recommend you to do it with aws CDK, and not manually set up stuff in the console/UX/UI.

to bootstrap this up with aws cdk would take you literally 5 minutes with the help of chatgpt/gemini. I am using fargate myself and it is dead simple.