Currently if an origin domain contains s3 in it anywhere then it assumes it's an s3 bucket and changes the url to ${bucketName}.s3.amazonaws.com
https://github.com/serverless-components/aws-cloudfront/blob/master/lib/getOriginConfig.js#L18
There should be a more in-depth check for this - at the last adding some dots in there like .s3. or something like that.
I'm actually trying to use an s3 redirect bucket like this http://{bucketName}.s3-website-eu-west-1.amazonaws.com so it's causing an issues as the redirect only works from s3-website-eu-west-1 urls not s3.amazonaws.com so had to fork and alter this.
Currently if an origin domain contains
s3in it anywhere then it assumes it's an s3 bucket and changes the url to${bucketName}.s3.amazonaws.comhttps://github.com/serverless-components/aws-cloudfront/blob/master/lib/getOriginConfig.js#L18
There should be a more in-depth check for this - at the last adding some dots in there like
.s3.or something like that.I'm actually trying to use an s3 redirect bucket like this
http://{bucketName}.s3-website-eu-west-1.amazonaws.comso it's causing an issues as the redirect only works froms3-website-eu-west-1urls nots3.amazonaws.comso had to fork and alter this.