SageMaker 处理作业的“enable_network_isolation”参数有什么作用?

问题描述 投票:0回答:1

我正在封闭网络中设置处理作业。我正在使用 SageMaker SDK 创建一个处理作业脚本来调用 SageMaker API 并将模型从 S3 注册到模型注册表。在此过程中,我为该作业指定网络配置。

network_config = NetworkConfig(security_group_ids=security_ids, subnets=subnets, enable_network_isolation=True)

script_processor = ScriptProcessor(
        network_config=network_config,

当我将“enable_network_isolation”设置为 True 时,遇到错误

botocore.exceptions.NoCredentialsError: Unable to locate credentials

至于问题:

当“enable_network_isolation”设置为 True 时,它的真正含义是什么? 即使我在 netconfig 中指定私有安全组和子网 ID,我也会假设处理作业已经在封闭网络中。但是,当我进一步将“enable_network_isolation”设置为 true 或 false 时,会发生什么?

我查过官方文档,但解释很模糊。我们需要您的帮助。

amazon-sagemaker vpc
1个回答
0
投票

enable_network_isolation
定义是否允许进出用于处理作业的容器的入站和出站网络调用。

它包含在基础设施安全文档中,但只提到了培训作业,但这同样适用于处理作业:

如果启用网络隔离,容器将无法进行任何操作 出站网络调用,甚至是对其他 AWS 服务(例如 Amazon S3)的调用。 此外,没有 AWS 凭证可供容器使用 运行环境

后者还解释了为什么您会收到错误

NoCredentialsError: Unable to locate credentials

© www.soinside.com 2019 - 2024. All rights reserved.