I have registered a domain on Route53, I have a react app running on port 3000 on amazon ec2 instance. To access the website I go to ipv4-address:3000. How to connect that registered domain to this ec2 instance. I have tried many ways by watching tutorial but failed.
Also how can I remove the port 3000 so that I can go see webpage with only example.com.
I am running react with pm2 and node js with forever.
You can't use Route53 to redirect traffic on ports 80 or 443 to port 3000. Think of a DNS record as a simple 'translation service' that takes a URL as input and 'translates' it to an IP address.
To achieve the redirection, you should use an Application Load Balancer by creating a listener on port 80 (for HTTP) or 443 (for HTTPS) that will redirect the traffic to your EC2 instance on port 3000.
You can find more info here on the official docs regarding the creation of an HTTP listener.