CodeBuild 与 Amazon Virtual Private Cloud 结合使用

通常,AWS CodeBuild 无法访问 VPC 中的资源。要支持访问,您必须提供额外的 VPC 特定配置信息以作为 CodeBuild 项目配置的一部分。这包括 VPC ID、VPC 子网 ID 和 VPC 安全组 ID。支持 VPC 的构建随后就可以访问 VPC 内的资源。

来自 AWS CodeBuild 构建的 VPC 连接使以下操作成为可能:

  • 通过您的构建对私有子网上隔离的 Amazon RDS 数据库中的数据运行集成测试。

  • 直接通过测试查询 Amazon ElastiCache 集群中的数据。

  • 与托管于 Amazon EC2、Amazon ECS 或使用内部 Elastic Load Balancing 的服务上的内部 Web 服务交互。

  • 从自托管的内部项目存储库 (如适用于 Python 的 PyPI、适用于 Java 的 Maven 和适用于 Node.js 的 npm) 检索依赖项。

  • 访问 Amazon S3 存储桶中配置为仅允许通过 Amazon VPC 终端节点访问的对象。

  • 通过与您的子网关联的 NAT 网关或 NAT 实例的弹性 IP 地址查询需要固定 IP 地址的外部 Web 服务。

您的构建可以访问您的 VPC 中托管的任何资源。

Typically, resources in an VPC are not accessible by AWS CodeBuild. To enable access, you must provide additional VPC-specific configuration information as part of your CodeBuild project configuration. This includes the VPC ID, the VPC subnet IDs, and the VPC security group IDs. VPC-enabled builds are then able to access resources inside your VPC. 

猜你喜欢

转载自www.cnblogs.com/cloudrivers/p/11634964.html