amazon-web-services - 如何在 Java 中使用 S3 VPC 端点?

标签 amazon-web-services amazon-s3

在 JAVA 中使用 S3 的 VPC 端点获取 S3 对象的方法是什么?我应该使用一个简单的 http 客户端吗?或者有没有办法使用 AmazonS3ClientBuilder 来做到这一点?

最佳答案

在配置后使用 S3 VPC 端点时,您不会做任何不同的事情。您的代码没有任何变化。

当 VPC 中的子网与为 VPC 端点配置的路由表相关联时,只会发生一件事:

  • 您所在区域的所有 S3 公共(public) IP 地址都路由到 VPC 端点,而不是遵循默认路由。

就是这样。

您的路由表中的前缀列表 pl-xxxxxxxx 表示您所在地区与 S3 关联的所有公共(public)子网的列表。该列表由 AWS 基础设施自动维护。当实例将流量发送到 S3 时,它会执行 DNS 查找以查找存储桶的 IP 地址。当它连接到该 IP 地址时,如果实例子网的路由表包含使用 S3 的 VPC 终端节点的前缀列表条目,它会通过该终端节点连接到 S3。

All instances in subnets associated with the specified route tables automatically use the endpoint to access the service; subnets that are not associated with the specified route tables do not use the endpoint to access the service.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html#vpc-endpoints-routing

关于amazon-web-services - 如何在 Java 中使用 S3 VPC 端点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42826341/

相关文章:

python - 如何在 Lambda 中处理来自 API 网关的二进制数据,反之亦然?

amazon-web-services - Centos 配置上的路由

amazon-web-services - 使用 Serverless 和 Node js 从 S3 存储桶获取文件

java - 如何运行位于远程服务器上的jar

azure - Azure/AWS/IBM 虚拟机中的防火墙?

asp.net - 从 ASP.NET Core Web API 将多 GB 文件流式传输到 AWS S3

scala - 如何在Scala中使用Amazon的DynamoDBMapper?

amazon-web-services - 是否可以在 SAM 模板中定义常量以使我的模板文件更易于维护?

amazon-s3 - minio:minio.io 对象存储服务器的集群架构是怎样的?

mysql - 未在 aws rds mysql 中为主用户设置 super 权限