[英]hosting static site in s3 bucket multiple environments using cloudfron
I've bucket named projectX that have 3 folders under (dev/staging/prod)我有一个名为 projectX 的存储桶,它在 (dev/staging/prod) 下有 3 个文件夹
Each one of the folders contain VueJs Application that should be served by cloudfront.每个文件夹都包含应由 cloudfront 提供的 VueJs 应用程序。
I managed to serve it by S3 API endpoint but when user refresh the page it's try to access the wrong place.我设法通过 S3 API 端点为其提供服务,但是当用户刷新页面时,它试图访问错误的位置。
Is this possible or I need to create bucket for each environment and use S3 website endpoint.这是可能的还是我需要为每个环境创建存储桶并使用 S3 网站端点。
Thanks you in advance提前谢谢你
You have to create each Route53 A record respective bucket and CloudFront S3 as origin.您必须创建每个 Route53 A 记录各自的存储桶和 CloudFront S3 作为源。 As in Route53 console it allow only mapping bucket ARN or name not inside folder or CloudFront ARN.
与在 Route53 控制台中一样,它只允许映射存储桶 ARN 或不在文件夹或 CloudFront ARN 内的名称。
Recommended: create separate bucket for each environment and mapped respective Route 53.推荐:为每个环境创建单独的存储桶并映射各自的 Route 53。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.