

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

# 多容器端点
<a name="multi-container-endpoints"></a>

SageMaker AI 多容器端点使客户能够在单个 A SageMaker I 端点上部署使用不同模型或框架的多个容器。可以将容器作为推理管线按顺序运行它们，也可以使用直接调用来单独访问每个容器，以提高端点利用率并优化成本。

有关按顺序调用多容器端点中容器的信息，请参阅[亚马逊 A SageMaker I 中的推理管道](inference-pipelines.md)。

有关调用多容器端点中的特定容器的信息，请参阅[通过直接调用来调用多容器端点](multi-container-direct.md)

**Topics**
+ [创建多容器端点 (Boto 3)](multi-container-create.md)
+ [更新多容器端点](multi-container-update.md)
+ [通过直接调用来调用多容器端点](multi-container-direct.md)
+ [进行直接调用的多容器端点的安全性](multi-container-security.md)
+ [进行直接调用的多容器端点的指标](multi-container-metrics.md)
+ [自动扩展多容器端点](multi-container-auto-scaling.md)
+ [多容器端点问题排查](multi-container-troubleshooting.md)

仅在 `TargetContainerHostname` 字段的值与指定的正则表达式之一匹配时，以下策略才允许发出 `invoke_endpoint` 请求：

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:sagemaker:us-east-1:111122223333:endpoint/endpoint_name",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "customIps*",
                        "common*"
                    ]
                }
            }
        }
    ]
}
```

------

在 `TargetContainerHostname` 字段的值与 `Deny` 语句中指定的正则表达式之一匹配时，以下策略拒绝发出 `invoke_endpoint` 请求。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:sagemaker:us-east-1:111122223333:endpoint/endpoint_name",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "model_name*"
                    ]
                }
            }
        },
        {
            "Action": [
                "sagemaker:InvokeEndpoint"
            ],
            "Effect": "Deny",
            "Resource": "arn:aws:sagemaker:us-east-1:111122223333:endpoint/endpoint_name",
            "Condition": {
                "StringLike": {
                    "sagemaker:TargetModel": [
                        "special-model_name*"
                    ]
                }
            }
        }
    ]
}
```

------

 有关 SageMaker AI 条件密钥的信息，请参阅《*Amazon Identity and Access Management 用户指南》*中的 [ SageMaker AI 条件密钥](https://docs.amazonaws.cn/IAM/latest/UserGuide/list_amazonsagemaker.html#amazonsagemaker-policy-keys)。