Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 是否可以更改存储在AWS S3存储桶中的图像的url路径名?_Amazon Web Services_Amazon S3 - Fatal编程技术网

Amazon web services 是否可以更改存储在AWS S3存储桶中的图像的url路径名?

Amazon web services 是否可以更改存储在AWS S3存储桶中的图像的url路径名?,amazon-web-services,amazon-s3,Amazon Web Services,Amazon S3,我正在将用户上传的图像保存到aws s3存储桶中,保存后,他们会有一个类似以下内容的urlhttps://.s3.eu-west-2.amazonaws.com/.png 有没有办法更改此url,使其看起来像https:///image/相反?这些URL是公共的,意味着可以从公共internet访问它们 如果您希望用户通过不同的URL访问它们,那么您需要一个域,并从该域路由到S3。例如:https://my-domain.com/image.png路由到https://.s3.eu-west-2

我正在将用户上传的图像保存到aws s3存储桶中,保存后,他们会有一个类似以下内容的url
https://.s3.eu-west-2.amazonaws.com/.png


有没有办法更改此url,使其看起来像
https:///image/
相反?

这些URL是公共的,意味着可以从公共internet访问它们

如果您希望用户通过不同的URL访问它们,那么您需要一个域,并从该域路由到S3。例如:
https://my-domain.com/image.png
路由到
https://.s3.eu-west-2.amazonaws.com/image.png


Route53支持这一点,请查看如何从R53路由到S3。

有一件事需要提及。。。bucket名称需要与DNS名称匹配。因此,如果您的域是
example.com
,那么bucket也需要命名为
example.com
。然后使用
CNAME
记录配置路由53,将域指向Amazon S3。