AWS cloudfront - how to serve s3 and EC2 using single cloudfront?

荒凉一梦 提交于 2019-12-11 06:18:27

问题


Is it possible to serve S3 and EC2 using single cloudfront?

Steps I followed so far are -

  1. Deployed a react app on S3 bucket
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!