ks888 / LambStatus

[Maintenance mode] Serverless Status Page System
https://lambstatus.github.io
Apache License 2.0
1.3k stars 119 forks source link

S3 website endpoints #33

Closed spohnan closed 7 years ago

spohnan commented 7 years ago

The concatenation used to form the S3 website endpoints used by CloudFront is broken for regions that use the .region instead of the -region format (Ohio, Canada, Mumbai, Seoul, Frankfurt and London)

http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html The two general forms of an Amazon S3 website endpoint are as follows: bucket-name.s3-website-region.amazonaws.com (dash region) bucket-name.s3-website.region.amazonaws.com (dot region)

Listing of all region endpoints http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints

Including a mapping lookup as a possible fix? https://blog.doismellburning.co.uk/pointing-aws-cloudfront-at-an-s3-website-with-cloudformation/

Admin and Status page CloudFront distribution origins https://github.com/ks888/LambStatus/blob/v0.3.0/cloudformation/lamb-status.yml#L2524 https://github.com/ks888/LambStatus/blob/v0.3.0/cloudformation/lamb-status.yml#L2573

ks888 commented 7 years ago

Thank you for creating the issue and your detailed report. It helps a lot. This PR fixes it. I'm going to release the next version soon.

spohnan commented 7 years ago

Tested from master and it now works as intended. My compliments to you on this project, very well done.