跳至內容

Virtual-hosted–style access not working in ap-northeast-1

0

Does AP-NORTHEAST-1 region support S3 Virtual-hosted–style access or is there any setting that needs to be enabled in bucket properties? I am able to access the bucket and objects with s3.ap-northeast-1.amazonaws.com as host in Cyberduck but not with bucketname.s3.ap-northeast-1.amazonaws.com.

Thanks!

已提問 2 年前檢視次數 377 次
1 個回答
0

Yes, ap-northeast-1 also supports virtual host-style access.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access

By the way, what error do you get when you access the site?

專家
已回答 2 年前
  • Thank you for the response, when I use the Virtual Hosted style URL(bucket.s3.ap-northeast-1.amazonaws.com), I am able to access the bucket and see objects but not able to access subfolders. I was getting an Access denied error. But, I am able to access the same subfolder with path style URL s3.ap-northeast-1.amazonaws.com as host and bucket in the path.

  • I also downloaded Cyberduck and tried it. It failed with the following error. If you look at the error carefully, you will see that the "host" to be accessed is "dir.bucketname.s3.ap-northeast-1.amazonaws.com", which causes an HTTP 404 error. We expect that this is probably caused by the specification of the Cyberduck program to create the URL to be accessed. cy

  • Yes, I saw the same host (dir.bucket.s3.region.amazonaws.com), and not sure why it is doing it. I believe I just have to use path styled URL with Cyberduck. I used the same tool with buckets in US-EAST-1 region before and worked fine. I just observed that it is working fine (with the same bucket in ap-northeast-1) if I remove the region from the URL. i.e., bucket.s3.amazonaws.com or if I supply bucket in the path filed instead of the host with the region in URL. i.e., host s3.region.amazonaws.com path: bucket/dir. Thank you!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。