Setting up a CNAME for an S3 bucket using Amazon Route 53

后端 未结 3 1802
时光取名叫无心
时光取名叫无心 2021-02-06 13:31

I need the following url

http://liangpai.s3.amazonaws.com/uploadImage/shareImage/2012-10/506dc1ef71dcf.png

showing as:

http://imgs.liangpai.me/uploadImag

3条回答
  •  甜味超标
    2021-02-06 14:14

    S3 CNAMEs require the bucket name to match the host name. If you want S3 to serve from imgs.langpai.me, you need to create a bucket named imgs.langpai.me. See the S3 documentation for more.

    You could create a CloudFront distribution to answer to imgs.langpai.me (see CloudFront CNAME support) have it and forward requests to langpai.s3.amazonaws.com. This would, of course, also incur CloudFront charges.

提交回复
热议问题