首页 > 解决方案 > 关于如何在 aws 上使用 cloudfront 和 global Accelerator 在同一域下公开前端/后端的建议

问题描述

我想使用 Cloudfront 来提供静态内容(React 前端 SPA)和指向 ALB(api 服务)的 Global Accelerator。我应该如何公开这两项服务?

For example, one solution might be (domain seperation)
1) api.example.com for my api (global accelerator)
2) example.com for my frontend (cloudfront), 

or:

(same domain, based on URL routing, but how to achieve this?)
1) example.com for frontend, (cloudfront)
2) example.com/api for api (global accelerator)
3) example.com/assets for s3 bucket. (cloudfront)

Do you have any suggestions or better ways to achieve what I need?

Thanks

标签: amazon-web-servicescloudglobalamazon-cloudfrontaccelerator

解决方案


推荐阅读