

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS Device Farm 中的 VPC-ENI
<a name="vpc-eni"></a>

**警告**  
此功能仅在[私有设备](https://docs.aws.amazon.com/devicefarm/latest/developerguide/working-with-private-devices.html)上可用。要在您的 AWS 账户中申请使用私人设备，请[联系我们](mailto:aws-devicefarm-support@amazon.com)。如果您的 AWS 账户中已经添加了私有设备，我们强烈建议您使用这种 VPC 连接方法。

AWS Device Farm 的 VPC-ENI 连接功能可帮助客户安全地连接到托管在本地软件或其他云提供 AWS商上的私有终端节点。

您可以将 Device Farm 移动设备及其主机连接到`us-west-2`该地区的亚马逊虚拟私有云 (Amazon VPC) 环境，从而允许通过[弹性网络接口](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ElasticNetworkInterfaces.html)访问隔离的 non-internet-facing服务和应用程序。有关更多信息 VPCs，请参阅 [Amazon VPC 用户指南](https://docs.aws.amazon.com/vpc/latest/userguide/)。

如果您的私有终端节点或 VPC 不在 `us-west-2` 区域内，则可以使用 [Transit Gateway](https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/transit-gateway.html) 或 [VPC 对等连接](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html)等解决方案将其与 `us-west-2` 区域的 VPC 关联起来。在这种情况下，Device Farm 将在您为 `us-west-2` 区域 VPC 提供的子网中创建 ENI，并且您将负责确保可以在 `us-west-2` 区域 VPC 与其他区域的 VPC 之间建立连接。

![\[AWS Device Farm architecture with on-premises and cloud components for mobile app testing.\]](http://docs.aws.amazon.com/zh_cn/devicefarm/latest/developerguide/images/VPC-ENI-Customer-Flow.jpg)


有关使用 AWS CloudFormation 自动创建和对等操作的信息 VPCs，请参阅上[VPCPeering 模板](https://github.com/awslabs/aws-cloudformation-templates/tree/master/aws/solutions/VPCPeering)存储库中的 AWS CloudFormation 模板 GitHub。

**注意**  
Device Farm 不会为在客户的 VPC ENIs 中创建而收取任何费用`us-west-2`。此功能不包括跨区域或外部 VPC 间连接的费用。

配置了 VPC 访问权限后，除非在 VPC 中指定了 NAT 网关，否则用于测试的设备和主机将无法连接到 VPC 以外的资源（例如公用 CDNs）。有关更多信息，请参阅*《Amazon VPC 用户指南》*中的 [NAT 网关](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html)。

**Topics**
+ [AWS 访问控制和 IAM](vpc-eni-access-control.md)
+ [服务关联角色](vpc-eni-service-linked-role.md)
+ [先决条件](vpc-eni-prerequisites.md)
+ [连接到 Amazon VPC](connecting-to-amazon-vpc.md)
+ [限制](vpc-eni-limits.md)
+ [将 Amazon VPC 端点服务与 Device Farm 结合使用 – 传统做法（不建议）](amazon-vpc-endpoints.md)