将 Amazon 调用配置为通过 VPC - Amazon Glue
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

将 Amazon 调用配置为通过 VPC

特殊作业参数 disable-proxy-v2 将允许您将调用通过 VPC 路由到服务,如 Amazon S3、CloudWatch 和 Amazon Glue。默认情况下,Amazon Glue 将使用本地代理通过 Amazon Glue VPC 发送流量,以从 Amazon S3 下载脚本和库;向 CloudWatch 发送请求,以发布日志和指标;以及向 Amazon Glue 发送请求,以访问数据目录。即使您的 VPC 没有将正确的路由配置到其他 Amazon 服务,如 Amazon S3、CloudWatch 和 Amazon Glue,此代理也会允许任务正常运行。Amazon Glue 现在为您提供参数,以关闭此行为。有关更多信息,请参阅 Amazon Glue 所使用的作业参数。Amazon Glue 将继续使用本地代理发布您的 Amazon Glue 作业的 CloudWatch 日志。

注意
  • 使用 Amazon Glue 版本 2.0 及更高版本的 Amazon Glue 任务支持此功能。使用此功能时,您需要确保您的 VPC 已通过 NAT 或服务 VPC 终端节点将路由配置到 Simple Storage Service (Amazon S3)。

  • 已弃用的任务参数 disable-proxy 仅会将您的调用路由到 Amazon S3,以便通过 VPC 下载脚本和库。建议改用新参数 disable-proxy-v2

示例用法

创建带有 disable-proxy-v2 的 Amazon Glue 任务:

aws glue create-job \ --name no-proxy-job \ --role GlueDefaultRole \ --command "Name=glueetl,ScriptLocation=s3://my-bucket/glue-script.py" \ --connections Connections="traffic-monitored-connection" \ --default-arguments '{"--disable-proxy-v2" : "true"}'