I am using react-router so I want to host in AWS Ec2. How to deploy the app and run permanently in the background or let me know if any other way
You can use Amazon S3.
Do npm run build in your local instance.
Upload the files to S3 bucket instance.
Static website hosting can be chosen.
https://s3.console.aws.amazon.com/s3/buckets