简体   繁体   English

访问没有区域终点的亚马逊S3存储桶

[英]access amazon s3 bucket without region end point

Currently, I am accessing Amazon S3 using the Access key, Secret Access Key and region endpoint in Amazon S3 SDK which working fine. 当前,我正在使用运行良好的Amazon S3 SDK中的访问密钥,秘密访问密钥和区域终端节点访问Amazon S3。
Like this 像这样

client = new AmazonS3Client("some-access-key", "some-secret-key",Amazon.RegionEndpoint.USEast1) 客户端=新的AmazonS3Client(“ some-access-key”,“ some-secret-key”,Amazon.RegionEndpoint.USEast1)

Is it possible to remove region endpoint because Bucket name will be one globally so why we need region endpoint? 是否可以删除区域端点,因为存储桶名称将是全局名称之一,为什么我们需要区域端点?

There must be some way through which we can able to get region endpoint of the bucket in Amazon S3 SDK?? 必须有某种方法可以获取Amazon S3 SDK中存储桶的区域终端节点? or can work without region endpoint if "Yes" then How ?? 或可以在没有区域端点的情况下工作,如果“是”,则如何操作? if "No" then Why?? 如果“否”,为什么?

A bucket will always have a region, when leaving it blank it will create the bucket in the US East region for you. 存储桶将始终具有一个区域,将其保留为空白时,它将为您在美国东部地区创建存储桶。 There can be several reasons for choosing a region, from the API reference : API参考中选择区域可能有多种原因:

By default, the bucket is created in the US East (N. Virginia) region. 默认情况下,该存储桶是在美国东部(弗吉尼亚北部)地区创建的。 You can optionally specify a region in the request body. 您可以选择在请求正文中指定一个区域。 You might choose a region to optimize latency, minimize costs, or address regulatory requirements. 您可以选择一个区域来优化延迟,最小化成本或满足法规要求。 For example, if you reside in Europe, you will probably find it advantageous to create buckets in the EU (Ireland) region. 例如,如果您居住在欧洲,则可能会发现在EU(爱尔兰)地区创建存储桶是有利的。

While a bucket is always in a region, it is possible to have your data available in multiple regions using Cross-Region Replication. 当存储桶始终位于一个区域中时,可以使用跨区域复制使数据在多个区域中可用。 Which might help with what you n eed. 这可能会帮助您满足需要。 See the blog post for details on how to set this up. 有关如何设置的详细信息,请参见博客文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM