问题
Is it possible to serve S3 and EC2 using single cloudfront?
Steps I followed so far are -
- Deployed a react app on S3 bucket
- Deployed a nodejs app on EC2
Both apps are running with their separate public DNS. I am trying to serve both apps using single cloudfront for example -
http://dyiqp9sog17kw.cloudfront.net >> it should serve react app, it is working as expected.
and
http://dyiqp9sog17kw.cloudfront.net/api >> Here I want to run my node app from EC2 but it is throwing Access Denied exception.
I am not sure if it is possible or not. Please help!!
来源:https://stackoverflow.com/questions/57310937/aws-cloudfront-how-to-serve-s3-and-ec2-using-single-cloudfront