在AWS S3托管静态网站时将长URL转换为短S3 URL的方法及报错解决
Amazon S3静态网站短URL配置问题
现有配置与目标诉求
- 正在Amazon S3上托管静态HTML网站
- 当前使用的长格式访问URL:
https://trabajos-costa-rica.s3.us-east-2.amazonaws.com/index.html - 期望调整后的短格式访问URL:
https://s3.amazonaws.com/trabajos-costa-rica/index.html - 已验证可正常访问的同格式线上短URL实例:
https://s3.amazonaws.com/walgreens-photo-coupon/walgreens/index.htmlhttps://s3.amazonaws.com/orlando-cremation-services/average-cost-of-cremation-in-orlando-florida-call-us-at-407-250-9846-2.htmlhttps://s3.amazonaws.com/dfc_attachments/public/documents/3260209/Dental_Plan_Overview_2019.pdf
核心疑问
这类不带区域标识的S3短URL,是通过什么配置方式实现的?
遇到的报错
尝试用目标短URL格式访问自有存储桶时,返回如下错误:
<Error> <Code>PermanentRedirect</Code> <Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message> <Endpoint>trabajos-costa-rica.s3.amazonaws.com</Endpoint> <Bucket>trabajos-costa-rica</Bucket> <RequestId>C8632DF84734CE4A</RequestId> <HostId>KyFNBQtuz2pwDPBMquz72kvozKWHOB3uN1ctiSKtuxvBqSvh9AaRISIQlqelOelLlQITGQCAwBs=</HostId> </Error>
- 需确认
PermanentRedirect报错是否为访问跨区域存储桶的通用提示 - 需确认实现目标短URL格式的正确配置方案
内容的提问来源于stack exchange,提问作者Ben
相关产品推荐
相关产品推荐

