Terraform配置SageMaker端点InputAndOutput数据捕获报错排查求助
SageMaker端点DataCaptureConfig配置排查建议
- 核对AWS Provider版本兼容性:即便升级到最新版,也要确认Provider文档中
data_capture_config的capture_mode字段支持InputAndOutput的具体版本号,避免使用预发布版或存在特性延迟的版本。 - 检查模型与端点配置约束:
- 确认所用模型类型支持
InputAndOutput捕获模式,部分自定义模型或特定框架模型可能存在限制。 - 验证
data_capture_config的其他参数:destination_s3_uri对应的S3桶需给SageMaker服务角色配置读写权限;capture_content_type_header需覆盖输入输出的内容类型。
- 确认所用模型类型支持
- 校验Terraform代码语法:
确保capture_mode取值拼写完全正确("InputAndOutput",AWS API对枚举值大小写敏感),避免拼写错误。示例代码参考:resource "aws_sagemaker_endpoint_configuration" "example" { name = "example-endpoint-config" production_variant { variant_name = "variant-1" model_name = aws_sagemaker_model.example.name initial_instance_count = 1 instance_type = "ml.t2.medium" data_capture_config { enable_capture = true capture_mode = "InputAndOutput" destination_s3_uri = "s3://your-bucket/path" capture_content_type_header { csv_content_types = ["text/csv"] json_content_types = ["application/json"] } } } } - 确认AWS区域支持:部分区域对SageMaker新特性的支持有延迟,检查当前使用的区域是否已开放
InputAndOutput捕获模式的支持。 - 排查IAM权限细节:除S3桶权限外,确认SageMaker服务角色拥有
sagemaker:CreateEndpointConfiguration、sagemaker:CreateEndpoint等必要权限,同时检查是否存在权限边界或组织策略限制该特性使用。 - 用AWS CLI直接测试:绕开Terraform,手动通过CLI创建带
InputAndOutput捕获模式的端点配置和端点。若CLI成功,问题出在Terraform代码或Provider;若CLI失败,则是AWS服务端限制或配置问题。
内容的提问来源于stack exchange,提问作者oakland_t
相关产品推荐
相关产品推荐

