My application js (SPA) hosted to S3 with public access, and setup EC2 in private subnet with internal load balancer on AWS (can't access by public).
Question: How can application on S3 can connect to internal load balancer on private subnet?
I agree with @Tuan VA, It's impossible what you are asking.
you need a public load balancer for your EC2
you can make sure website private as described below:
1. Set up the static website as normal,
2. Add a VPC endpoint for S3,
3. Use a bucket policy to deny all but traffic from your VPC