大规模设置S3 + Cloudfront

时间:2018-09-10 06:43:20

标签: amazon-web-services amazon-cloudformation

我有一个带有“ example.com”托管区域和* .example.com arn:aws:acm:us-east-1:XXXXXX:certificate / uuid的AWS帐户。

我需要建立多个站点{1..10}.example.com。理想情况下,每个站点在我的本地ap-southeast-1中都应有一个名称相同的S3存储桶,并在每个站点前面设置一个CloudFront分布。

我尝试过Terraform,但是由于https://github.com/ringods/terraform-website-s3-cloudfront-route53/tree/master/site-redirect看起来太复杂了,所以我停了下来。

我尝试了https://github.com/widdix/aws-cf-templates/blob/master/static-website/static-website.yaml,但是失败了,因为“找不到名为-HostedZoneId的导出。”

我还尝试了https://github.com/taimos/cloudformation/blob/master/static-website/static-website.yaml,它非常接近。唯一的主要问题是,似乎希望我在Route53中提前创建{1..10} .example.com区域。我不确定为什么它不能仅使用CloudFront地址填充现有的 example.com 区域。此外,我不喜欢默认情况下它如何使用www。{1..10} .example.com。我不需要 www 前缀/子域。

我觉得用例相当简单并且很流行,但是我一直在努力寻找解决方案。有指针吗?预先谢谢你。

0 个答案:

没有答案