I'm having an issue with intermittent timeouts when trying to access my AWS ECS service through a custom domain that's set up with a CNAME record.
My AWS ECS service is behind an ELB, and everything works perfectly when I use the ELB's DNS name directly. However, the custom domain is configured with a third-party DNS provider and points to the ELB's DNS name via a CNAME record. The problem is that when I use the custom domain, I frequently run into timeouts. Strangely enough, it does work sometimes, but the behavior is inconsistent.
I've checked Security Groups and Network ACLs are correctly configured to allow all necessary traffic. DNS resolution works, as verified with nslookup and dig. The custom domain correctly resolves to the ELB's IP addresses. No issues are observed when using the ELB DNS name directly.
I'm really stuck here, guys maybe you know what's going on?