Self-hosting services on EC2 instances can come with unexpected behavior. If the service is hosted using Nginx, it typically expects a "Host" header. If you have Cloudfront between the EC2 instance and the internet (e.g., for caching, delivery, etc.), Cloudfront won't forward the "Host" header by default.
In Cloudfront settings, go to "Behavior."
Select "Use legacy cache settings"
Select "Whitelist" as the method to whitelist Headers
Select "Host" then click "Add >>"
Wait for Cloudfront to deplay and you should be good!