Amazon SageMaker Service

2023/06/30 - Amazon SageMaker Service - 6 updated api methods

Changes  This release adds support for rolling deployment in SageMaker Inference.

CreateEndpoint (updated) Link ¶
Changes (request)
{'DeploymentConfig': {'RollingUpdatePolicy': {'MaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                           '| '
                                                                           'CAPACITY_PERCENT',
                                                                   'Value': 'integer'},
                                              'MaximumExecutionTimeoutInSeconds': 'integer',
                                              'RollbackMaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                                   '| '
                                                                                   'CAPACITY_PERCENT',
                                                                           'Value': 'integer'},
                                              'WaitIntervalInSeconds': 'integer'}}}

Creates an endpoint using the endpoint configuration specified in the request. SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the CreateEndpointConfig API.

Use this API to deploy models using SageMaker hosting services.

For an example that calls this method when deploying a model to SageMaker hosting services, see the Create Endpoint example notebook.

Note

You must not delete an EndpointConfig that is in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig .

The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account.

When it receives the request, SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them.

Note

When you call CreateEndpoint , a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting ` Eventually Consistent Reads https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html`__ , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.

When SageMaker receives the request, it sets the endpoint status to Creating . After it creates the endpoint, it sets the status to InService . SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the DescribeEndpoint API.

If any of the models hosted at this endpoint get model data from an Amazon S3 location, SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your Amazon Web Services account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region in the Amazon Web Services Identity and Access Management User Guide .

Note

To add the IAM role policies for using this API operation, go to the IAM console , and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the CreateEndpoint and CreateEndpointConfig API operations, add the following policies to the role.

  • Option 1: For a full SageMaker access, search and attach the AmazonSageMakerFullAccess policy.

  • Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"] "Resource": [ "arn:aws:sagemaker:region:account-id:endpoint/endpointName" "arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName" ] For more information, see SageMaker API Permissions: Actions, Permissions, and Resources Reference .

See also: AWS API Documentation

Request Syntax

client.create_endpoint(
    EndpointName='string',
    EndpointConfigName='string',
    DeploymentConfig={
        'BlueGreenUpdatePolicy': {
            'TrafficRoutingConfiguration': {
                'Type': 'ALL_AT_ONCE'|'CANARY'|'LINEAR',
                'WaitIntervalInSeconds': 123,
                'CanarySize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                },
                'LinearStepSize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                }
            },
            'TerminationWaitInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123
        },
        'AutoRollbackConfiguration': {
            'Alarms': [
                {
                    'AlarmName': 'string'
                },
            ]
        },
        'RollingUpdatePolicy': {
            'MaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            },
            'WaitIntervalInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123,
            'RollbackMaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            }
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type EndpointName

string

param EndpointName

[REQUIRED]

The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in CreateEndpoint , but the case is preserved and must be matched in InvokeEndpoint .

type EndpointConfigName

string

param EndpointConfigName

[REQUIRED]

The name of an endpoint configuration. For more information, see CreateEndpointConfig .

type DeploymentConfig

dict

param DeploymentConfig

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

  • BlueGreenUpdatePolicy (dict) --

    Update policy for a blue/green deployment. If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default.

    • TrafficRoutingConfiguration (dict) -- [REQUIRED]

      Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.

      • Type (string) -- [REQUIRED]

        Traffic routing strategy type.

        • ALL_AT_ONCE : Endpoint traffic shifts to the new fleet in a single step.

        • CANARY : Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic.

        • LINEAR : Endpoint traffic shifts to the new fleet in n steps of a configurable size.

      • WaitIntervalInSeconds (integer) -- [REQUIRED]

        The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.

      • CanarySize (dict) --

        Batch size for the first step to turn on traffic on the new endpoint fleet. Value must be less than or equal to 50% of the variant's total instance count.

        • Type (string) -- [REQUIRED]

          Specifies the endpoint capacity type.

          • INSTANCE_COUNT : The endpoint activates based on the number of instances.

          • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

        • Value (integer) -- [REQUIRED]

          Defines the capacity size, either as a number of instances or a capacity percentage.

      • LinearStepSize (dict) --

        Batch size for each step to turn on traffic on the new endpoint fleet. Value must be 10-50% of the variant's total instance count.

        • Type (string) -- [REQUIRED]

          Specifies the endpoint capacity type.

          • INSTANCE_COUNT : The endpoint activates based on the number of instances.

          • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

        • Value (integer) -- [REQUIRED]

          Defines the capacity size, either as a number of instances or a capacity percentage.

    • TerminationWaitInSeconds (integer) --

      Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet. Default is 0.

    • MaximumExecutionTimeoutInSeconds (integer) --

      Maximum execution timeout for the deployment. Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .

  • AutoRollbackConfiguration (dict) --

    Automatic rollback configuration for handling endpoint deployment failures and recovery.

    • Alarms (list) --

      List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls back the deployment.

      • (dict) --

        An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.

        • AlarmName (string) --

          The name of a CloudWatch alarm in your account.

  • RollingUpdatePolicy (dict) --

    Specifies a rolling deployment strategy for updating a SageMaker endpoint.

    • MaximumBatchSize (dict) -- [REQUIRED]

      Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant's total instance count.

      • Type (string) -- [REQUIRED]

        Specifies the endpoint capacity type.

        • INSTANCE_COUNT : The endpoint activates based on the number of instances.

        • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

      • Value (integer) -- [REQUIRED]

        Defines the capacity size, either as a number of instances or a capacity percentage.

    • WaitIntervalInSeconds (integer) -- [REQUIRED]

      The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.

    • MaximumExecutionTimeoutInSeconds (integer) --

      The time limit for the total deployment. Exceeding this limit causes a timeout.

    • RollbackMaximumBatchSize (dict) --

      Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.

      • Type (string) -- [REQUIRED]

        Specifies the endpoint capacity type.

        • INSTANCE_COUNT : The endpoint activates based on the number of instances.

        • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

      • Value (integer) -- [REQUIRED]

        Defines the capacity size, either as a number of instances or a capacity percentage.

type Tags

list

param Tags

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources .

  • (dict) --

    A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

    You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags .

    For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources . For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy .

    • Key (string) -- [REQUIRED]

      The tag key. Tag keys must be unique per resource.

    • Value (string) -- [REQUIRED]

      The tag value.

rtype

dict

returns

Response Syntax

{
    'EndpointArn': 'string'
}

Response Structure

  • (dict) --

    • EndpointArn (string) --

      The Amazon Resource Name (ARN) of the endpoint.

DescribeEndpoint (updated) Link ¶
Changes (response)
{'EndpointStatus': {'UpdateRollbackFailed'},
 'LastDeploymentConfig': {'RollingUpdatePolicy': {'MaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                               '| '
                                                                               'CAPACITY_PERCENT',
                                                                       'Value': 'integer'},
                                                  'MaximumExecutionTimeoutInSeconds': 'integer',
                                                  'RollbackMaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                                       '| '
                                                                                       'CAPACITY_PERCENT',
                                                                               'Value': 'integer'},
                                                  'WaitIntervalInSeconds': 'integer'}}}

Returns the description of an endpoint.

See also: AWS API Documentation

Request Syntax

client.describe_endpoint(
    EndpointName='string'
)
type EndpointName

string

param EndpointName

[REQUIRED]

The name of the endpoint.

rtype

dict

returns

Response Syntax

{
    'EndpointName': 'string',
    'EndpointArn': 'string',
    'EndpointConfigName': 'string',
    'ProductionVariants': [
        {
            'VariantName': 'string',
            'DeployedImages': [
                {
                    'SpecifiedImage': 'string',
                    'ResolvedImage': 'string',
                    'ResolutionTime': datetime(2015, 1, 1)
                },
            ],
            'CurrentWeight': ...,
            'DesiredWeight': ...,
            'CurrentInstanceCount': 123,
            'DesiredInstanceCount': 123,
            'VariantStatus': [
                {
                    'Status': 'Creating'|'Updating'|'Deleting'|'ActivatingTraffic'|'Baking',
                    'StatusMessage': 'string',
                    'StartTime': datetime(2015, 1, 1)
                },
            ],
            'CurrentServerlessConfig': {
                'MemorySizeInMB': 123,
                'MaxConcurrency': 123,
                'ProvisionedConcurrency': 123
            },
            'DesiredServerlessConfig': {
                'MemorySizeInMB': 123,
                'MaxConcurrency': 123,
                'ProvisionedConcurrency': 123
            }
        },
    ],
    'DataCaptureConfig': {
        'EnableCapture': True|False,
        'CaptureStatus': 'Started'|'Stopped',
        'CurrentSamplingPercentage': 123,
        'DestinationS3Uri': 'string',
        'KmsKeyId': 'string'
    },
    'EndpointStatus': 'OutOfService'|'Creating'|'Updating'|'SystemUpdating'|'RollingBack'|'InService'|'Deleting'|'Failed'|'UpdateRollbackFailed',
    'FailureReason': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastDeploymentConfig': {
        'BlueGreenUpdatePolicy': {
            'TrafficRoutingConfiguration': {
                'Type': 'ALL_AT_ONCE'|'CANARY'|'LINEAR',
                'WaitIntervalInSeconds': 123,
                'CanarySize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                },
                'LinearStepSize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                }
            },
            'TerminationWaitInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123
        },
        'AutoRollbackConfiguration': {
            'Alarms': [
                {
                    'AlarmName': 'string'
                },
            ]
        },
        'RollingUpdatePolicy': {
            'MaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            },
            'WaitIntervalInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123,
            'RollbackMaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            }
        }
    },
    'AsyncInferenceConfig': {
        'ClientConfig': {
            'MaxConcurrentInvocationsPerInstance': 123
        },
        'OutputConfig': {
            'KmsKeyId': 'string',
            'S3OutputPath': 'string',
            'NotificationConfig': {
                'SuccessTopic': 'string',
                'ErrorTopic': 'string',
                'IncludeInferenceResponseIn': [
                    'SUCCESS_NOTIFICATION_TOPIC'|'ERROR_NOTIFICATION_TOPIC',
                ]
            },
            'S3FailurePath': 'string'
        }
    },
    'PendingDeploymentSummary': {
        'EndpointConfigName': 'string',
        'ProductionVariants': [
            {
                'VariantName': 'string',
                'DeployedImages': [
                    {
                        'SpecifiedImage': 'string',
                        'ResolvedImage': 'string',
                        'ResolutionTime': datetime(2015, 1, 1)
                    },
                ],
                'CurrentWeight': ...,
                'DesiredWeight': ...,
                'CurrentInstanceCount': 123,
                'DesiredInstanceCount': 123,
                'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.c6i.large'|'ml.c6i.xlarge'|'ml.c6i.2xlarge'|'ml.c6i.4xlarge'|'ml.c6i.8xlarge'|'ml.c6i.12xlarge'|'ml.c6i.16xlarge'|'ml.c6i.24xlarge'|'ml.c6i.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.p4d.24xlarge'|'ml.c7g.large'|'ml.c7g.xlarge'|'ml.c7g.2xlarge'|'ml.c7g.4xlarge'|'ml.c7g.8xlarge'|'ml.c7g.12xlarge'|'ml.c7g.16xlarge'|'ml.m6g.large'|'ml.m6g.xlarge'|'ml.m6g.2xlarge'|'ml.m6g.4xlarge'|'ml.m6g.8xlarge'|'ml.m6g.12xlarge'|'ml.m6g.16xlarge'|'ml.m6gd.large'|'ml.m6gd.xlarge'|'ml.m6gd.2xlarge'|'ml.m6gd.4xlarge'|'ml.m6gd.8xlarge'|'ml.m6gd.12xlarge'|'ml.m6gd.16xlarge'|'ml.c6g.large'|'ml.c6g.xlarge'|'ml.c6g.2xlarge'|'ml.c6g.4xlarge'|'ml.c6g.8xlarge'|'ml.c6g.12xlarge'|'ml.c6g.16xlarge'|'ml.c6gd.large'|'ml.c6gd.xlarge'|'ml.c6gd.2xlarge'|'ml.c6gd.4xlarge'|'ml.c6gd.8xlarge'|'ml.c6gd.12xlarge'|'ml.c6gd.16xlarge'|'ml.c6gn.large'|'ml.c6gn.xlarge'|'ml.c6gn.2xlarge'|'ml.c6gn.4xlarge'|'ml.c6gn.8xlarge'|'ml.c6gn.12xlarge'|'ml.c6gn.16xlarge'|'ml.r6g.large'|'ml.r6g.xlarge'|'ml.r6g.2xlarge'|'ml.r6g.4xlarge'|'ml.r6g.8xlarge'|'ml.r6g.12xlarge'|'ml.r6g.16xlarge'|'ml.r6gd.large'|'ml.r6gd.xlarge'|'ml.r6gd.2xlarge'|'ml.r6gd.4xlarge'|'ml.r6gd.8xlarge'|'ml.r6gd.12xlarge'|'ml.r6gd.16xlarge'|'ml.p4de.24xlarge'|'ml.trn1.2xlarge'|'ml.trn1.32xlarge'|'ml.inf2.xlarge'|'ml.inf2.8xlarge'|'ml.inf2.24xlarge'|'ml.inf2.48xlarge',
                'AcceleratorType': 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge',
                'VariantStatus': [
                    {
                        'Status': 'Creating'|'Updating'|'Deleting'|'ActivatingTraffic'|'Baking',
                        'StatusMessage': 'string',
                        'StartTime': datetime(2015, 1, 1)
                    },
                ],
                'CurrentServerlessConfig': {
                    'MemorySizeInMB': 123,
                    'MaxConcurrency': 123,
                    'ProvisionedConcurrency': 123
                },
                'DesiredServerlessConfig': {
                    'MemorySizeInMB': 123,
                    'MaxConcurrency': 123,
                    'ProvisionedConcurrency': 123
                }
            },
        ],
        'StartTime': datetime(2015, 1, 1),
        'ShadowProductionVariants': [
            {
                'VariantName': 'string',
                'DeployedImages': [
                    {
                        'SpecifiedImage': 'string',
                        'ResolvedImage': 'string',
                        'ResolutionTime': datetime(2015, 1, 1)
                    },
                ],
                'CurrentWeight': ...,
                'DesiredWeight': ...,
                'CurrentInstanceCount': 123,
                'DesiredInstanceCount': 123,
                'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.12xlarge'|'ml.m5d.24xlarge'|'ml.c4.large'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.large'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.12xlarge'|'ml.r5.24xlarge'|'ml.r5d.large'|'ml.r5d.xlarge'|'ml.r5d.2xlarge'|'ml.r5d.4xlarge'|'ml.r5d.12xlarge'|'ml.r5d.24xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.c6i.large'|'ml.c6i.xlarge'|'ml.c6i.2xlarge'|'ml.c6i.4xlarge'|'ml.c6i.8xlarge'|'ml.c6i.12xlarge'|'ml.c6i.16xlarge'|'ml.c6i.24xlarge'|'ml.c6i.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.p4d.24xlarge'|'ml.c7g.large'|'ml.c7g.xlarge'|'ml.c7g.2xlarge'|'ml.c7g.4xlarge'|'ml.c7g.8xlarge'|'ml.c7g.12xlarge'|'ml.c7g.16xlarge'|'ml.m6g.large'|'ml.m6g.xlarge'|'ml.m6g.2xlarge'|'ml.m6g.4xlarge'|'ml.m6g.8xlarge'|'ml.m6g.12xlarge'|'ml.m6g.16xlarge'|'ml.m6gd.large'|'ml.m6gd.xlarge'|'ml.m6gd.2xlarge'|'ml.m6gd.4xlarge'|'ml.m6gd.8xlarge'|'ml.m6gd.12xlarge'|'ml.m6gd.16xlarge'|'ml.c6g.large'|'ml.c6g.xlarge'|'ml.c6g.2xlarge'|'ml.c6g.4xlarge'|'ml.c6g.8xlarge'|'ml.c6g.12xlarge'|'ml.c6g.16xlarge'|'ml.c6gd.large'|'ml.c6gd.xlarge'|'ml.c6gd.2xlarge'|'ml.c6gd.4xlarge'|'ml.c6gd.8xlarge'|'ml.c6gd.12xlarge'|'ml.c6gd.16xlarge'|'ml.c6gn.large'|'ml.c6gn.xlarge'|'ml.c6gn.2xlarge'|'ml.c6gn.4xlarge'|'ml.c6gn.8xlarge'|'ml.c6gn.12xlarge'|'ml.c6gn.16xlarge'|'ml.r6g.large'|'ml.r6g.xlarge'|'ml.r6g.2xlarge'|'ml.r6g.4xlarge'|'ml.r6g.8xlarge'|'ml.r6g.12xlarge'|'ml.r6g.16xlarge'|'ml.r6gd.large'|'ml.r6gd.xlarge'|'ml.r6gd.2xlarge'|'ml.r6gd.4xlarge'|'ml.r6gd.8xlarge'|'ml.r6gd.12xlarge'|'ml.r6gd.16xlarge'|'ml.p4de.24xlarge'|'ml.trn1.2xlarge'|'ml.trn1.32xlarge'|'ml.inf2.xlarge'|'ml.inf2.8xlarge'|'ml.inf2.24xlarge'|'ml.inf2.48xlarge',
                'AcceleratorType': 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge',
                'VariantStatus': [
                    {
                        'Status': 'Creating'|'Updating'|'Deleting'|'ActivatingTraffic'|'Baking',
                        'StatusMessage': 'string',
                        'StartTime': datetime(2015, 1, 1)
                    },
                ],
                'CurrentServerlessConfig': {
                    'MemorySizeInMB': 123,
                    'MaxConcurrency': 123,
                    'ProvisionedConcurrency': 123
                },
                'DesiredServerlessConfig': {
                    'MemorySizeInMB': 123,
                    'MaxConcurrency': 123,
                    'ProvisionedConcurrency': 123
                }
            },
        ]
    },
    'ExplainerConfig': {
        'ClarifyExplainerConfig': {
            'EnableExplanations': 'string',
            'InferenceConfig': {
                'FeaturesAttribute': 'string',
                'ContentTemplate': 'string',
                'MaxRecordCount': 123,
                'MaxPayloadInMB': 123,
                'ProbabilityIndex': 123,
                'LabelIndex': 123,
                'ProbabilityAttribute': 'string',
                'LabelAttribute': 'string',
                'LabelHeaders': [
                    'string',
                ],
                'FeatureHeaders': [
                    'string',
                ],
                'FeatureTypes': [
                    'numerical'|'categorical'|'text',
                ]
            },
            'ShapConfig': {
                'ShapBaselineConfig': {
                    'MimeType': 'string',
                    'ShapBaseline': 'string',
                    'ShapBaselineUri': 'string'
                },
                'NumberOfSamples': 123,
                'UseLogit': True|False,
                'Seed': 123,
                'TextConfig': {
                    'Language': 'af'|'sq'|'ar'|'hy'|'eu'|'bn'|'bg'|'ca'|'zh'|'hr'|'cs'|'da'|'nl'|'en'|'et'|'fi'|'fr'|'de'|'el'|'gu'|'he'|'hi'|'hu'|'is'|'id'|'ga'|'it'|'kn'|'ky'|'lv'|'lt'|'lb'|'mk'|'ml'|'mr'|'ne'|'nb'|'fa'|'pl'|'pt'|'ro'|'ru'|'sa'|'sr'|'tn'|'si'|'sk'|'sl'|'es'|'sv'|'tl'|'ta'|'tt'|'te'|'tr'|'uk'|'ur'|'yo'|'lij'|'xx',
                    'Granularity': 'token'|'sentence'|'paragraph'
                }
            }
        }
    },
    'ShadowProductionVariants': [
        {
            'VariantName': 'string',
            'DeployedImages': [
                {
                    'SpecifiedImage': 'string',
                    'ResolvedImage': 'string',
                    'ResolutionTime': datetime(2015, 1, 1)
                },
            ],
            'CurrentWeight': ...,
            'DesiredWeight': ...,
            'CurrentInstanceCount': 123,
            'DesiredInstanceCount': 123,
            'VariantStatus': [
                {
                    'Status': 'Creating'|'Updating'|'Deleting'|'ActivatingTraffic'|'Baking',
                    'StatusMessage': 'string',
                    'StartTime': datetime(2015, 1, 1)
                },
            ],
            'CurrentServerlessConfig': {
                'MemorySizeInMB': 123,
                'MaxConcurrency': 123,
                'ProvisionedConcurrency': 123
            },
            'DesiredServerlessConfig': {
                'MemorySizeInMB': 123,
                'MaxConcurrency': 123,
                'ProvisionedConcurrency': 123
            }
        },
    ]
}

Response Structure

  • (dict) --

    • EndpointName (string) --

      Name of the endpoint.

    • EndpointArn (string) --

      The Amazon Resource Name (ARN) of the endpoint.

    • EndpointConfigName (string) --

      The name of the endpoint configuration associated with this endpoint.

    • ProductionVariants (list) --

      An array of ProductionVariantSummary objects, one for each model hosted behind this endpoint.

      • (dict) --

        Describes weight and capacities for a production variant associated with an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities API and the endpoint status is Updating , you get different desired and current values.

        • VariantName (string) --

          The name of the variant.

        • DeployedImages (list) --

          An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant .

          • (dict) --

            Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant .

            If you used the registry/repository[:tag] form to specify the image path of the primary container when you created the model hosted in this ProductionVariant , the path resolves to a path of the form registry/repository[@digest] . A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide .

            • SpecifiedImage (string) --

              The image path you specified when you created the model.

            • ResolvedImage (string) --

              The specific digest path of the image hosted in this ProductionVariant .

            • ResolutionTime (datetime) --

              The date and time when the image path for the model resolved to the ResolvedImage

        • CurrentWeight (float) --

          The weight associated with the variant.

        • DesiredWeight (float) --

          The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request.

        • CurrentInstanceCount (integer) --

          The number of instances associated with the variant.

        • DesiredInstanceCount (integer) --

          The number of instances requested in the UpdateEndpointWeightsAndCapacities request.

        • VariantStatus (list) --

          The endpoint variant status which describes the current deployment stage status or operational status.

          • (dict) --

            Describes the status of the production variant.

            • Status (string) --

              The endpoint variant status which describes the current deployment stage status or operational status.

              • Creating : Creating inference resources for the production variant.

              • Deleting : Terminating inference resources for the production variant.

              • Updating : Updating capacity for the production variant.

              • ActivatingTraffic : Turning on traffic for the production variant.

              • Baking : Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration.

            • StatusMessage (string) --

              A message that describes the status of the production variant.

            • StartTime (datetime) --

              The start time of the current status change.

        • CurrentServerlessConfig (dict) --

          The serverless configuration for the endpoint.

          • MemorySizeInMB (integer) --

            The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

          • MaxConcurrency (integer) --

            The maximum number of concurrent invocations your serverless endpoint can process.

          • ProvisionedConcurrency (integer) --

            The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

        • DesiredServerlessConfig (dict) --

          The serverless configuration requested for the endpoint update.

          • MemorySizeInMB (integer) --

            The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

          • MaxConcurrency (integer) --

            The maximum number of concurrent invocations your serverless endpoint can process.

          • ProvisionedConcurrency (integer) --

            The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

    • DataCaptureConfig (dict) --

      The currently active data capture configuration used by your Endpoint.

      • EnableCapture (boolean) --

        Whether data capture is enabled or disabled.

      • CaptureStatus (string) --

        Whether data capture is currently functional.

      • CurrentSamplingPercentage (integer) --

        The percentage of requests being captured by your Endpoint.

      • DestinationS3Uri (string) --

        The Amazon S3 location being used to capture the data.

      • KmsKeyId (string) --

        The KMS key being used to encrypt the data in Amazon S3.

    • EndpointStatus (string) --

      The status of the endpoint.

      • OutOfService : Endpoint is not available to take incoming requests.

      • Creating : CreateEndpoint is executing.

      • Updating : UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing.

      • SystemUpdating : Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count.

      • RollingBack : Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly.

      • InService : Endpoint is available to process incoming requests.

      • Deleting : DeleteEndpoint is executing.

      • Failed : Endpoint could not be created, updated, or re-scaled. Use the FailureReason value returned by DescribeEndpoint for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint.

    • FailureReason (string) --

      If the status of the endpoint is Failed , the reason why it failed.

    • CreationTime (datetime) --

      A timestamp that shows when the endpoint was created.

    • LastModifiedTime (datetime) --

      A timestamp that shows when the endpoint was last modified.

    • LastDeploymentConfig (dict) --

      The most recent deployment configuration for the endpoint.

      • BlueGreenUpdatePolicy (dict) --

        Update policy for a blue/green deployment. If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default.

        • TrafficRoutingConfiguration (dict) --

          Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.

          • Type (string) --

            Traffic routing strategy type.

            • ALL_AT_ONCE : Endpoint traffic shifts to the new fleet in a single step.

            • CANARY : Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic.

            • LINEAR : Endpoint traffic shifts to the new fleet in n steps of a configurable size.

          • WaitIntervalInSeconds (integer) --

            The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.

          • CanarySize (dict) --

            Batch size for the first step to turn on traffic on the new endpoint fleet. Value must be less than or equal to 50% of the variant's total instance count.

            • Type (string) --

              Specifies the endpoint capacity type.

              • INSTANCE_COUNT : The endpoint activates based on the number of instances.

              • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

            • Value (integer) --

              Defines the capacity size, either as a number of instances or a capacity percentage.

          • LinearStepSize (dict) --

            Batch size for each step to turn on traffic on the new endpoint fleet. Value must be 10-50% of the variant's total instance count.

            • Type (string) --

              Specifies the endpoint capacity type.

              • INSTANCE_COUNT : The endpoint activates based on the number of instances.

              • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

            • Value (integer) --

              Defines the capacity size, either as a number of instances or a capacity percentage.

        • TerminationWaitInSeconds (integer) --

          Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet. Default is 0.

        • MaximumExecutionTimeoutInSeconds (integer) --

          Maximum execution timeout for the deployment. Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .

      • AutoRollbackConfiguration (dict) --

        Automatic rollback configuration for handling endpoint deployment failures and recovery.

        • Alarms (list) --

          List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls back the deployment.

          • (dict) --

            An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.

            • AlarmName (string) --

              The name of a CloudWatch alarm in your account.

      • RollingUpdatePolicy (dict) --

        Specifies a rolling deployment strategy for updating a SageMaker endpoint.

        • MaximumBatchSize (dict) --

          Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant's total instance count.

          • Type (string) --

            Specifies the endpoint capacity type.

            • INSTANCE_COUNT : The endpoint activates based on the number of instances.

            • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

          • Value (integer) --

            Defines the capacity size, either as a number of instances or a capacity percentage.

        • WaitIntervalInSeconds (integer) --

          The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.

        • MaximumExecutionTimeoutInSeconds (integer) --

          The time limit for the total deployment. Exceeding this limit causes a timeout.

        • RollbackMaximumBatchSize (dict) --

          Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.

          • Type (string) --

            Specifies the endpoint capacity type.

            • INSTANCE_COUNT : The endpoint activates based on the number of instances.

            • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

          • Value (integer) --

            Defines the capacity size, either as a number of instances or a capacity percentage.

    • AsyncInferenceConfig (dict) --

      Returns the description of an endpoint configuration created using the ` CreateEndpointConfig https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html`__ API.

      • ClientConfig (dict) --

        Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.

        • MaxConcurrentInvocationsPerInstance (integer) --

          The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.

      • OutputConfig (dict) --

        Specifies the configuration for asynchronous inference invocation outputs.

        • KmsKeyId (string) --

          The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3.

        • S3OutputPath (string) --

          The Amazon S3 location to upload inference responses to.

        • NotificationConfig (dict) --

          Specifies the configuration for notifications of inference results for asynchronous inference.

          • SuccessTopic (string) --

            Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no notification is sent on success.

          • ErrorTopic (string) --

            Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent on failure.

          • IncludeInferenceResponseIn (list) --

            The Amazon SNS topics where you want the inference response to be included.

            Note

            The inference response is included only if the response size is less than or equal to 128 KB.

            • (string) --

        • S3FailurePath (string) --

          The Amazon S3 location to upload failure inference responses to.

    • PendingDeploymentSummary (dict) --

      Returns the summary of an in-progress deployment. This field is only returned when the endpoint is creating or updating with a new endpoint configuration.

      • EndpointConfigName (string) --

        The name of the endpoint configuration used in the deployment.

      • ProductionVariants (list) --

        An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint for the in-progress deployment.

        • (dict) --

          The production variant summary for a deployment when an endpoint is creating or updating with the CreateEndpoint or UpdateEndpoint operations. Describes the VariantStatus , weight and capacity for a production variant associated with an endpoint.

          • VariantName (string) --

            The name of the variant.

          • DeployedImages (list) --

            An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant .

            • (dict) --

              Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant .

              If you used the registry/repository[:tag] form to specify the image path of the primary container when you created the model hosted in this ProductionVariant , the path resolves to a path of the form registry/repository[@digest] . A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide .

              • SpecifiedImage (string) --

                The image path you specified when you created the model.

              • ResolvedImage (string) --

                The specific digest path of the image hosted in this ProductionVariant .

              • ResolutionTime (datetime) --

                The date and time when the image path for the model resolved to the ResolvedImage

          • CurrentWeight (float) --

            The weight associated with the variant.

          • DesiredWeight (float) --

            The requested weight for the variant in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation.

          • CurrentInstanceCount (integer) --

            The number of instances associated with the variant.

          • DesiredInstanceCount (integer) --

            The number of instances requested in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation.

          • InstanceType (string) --

            The type of instances associated with the variant.

          • AcceleratorType (string) --

            The size of the Elastic Inference (EI) instance to use for the production variant. EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker .

          • VariantStatus (list) --

            The endpoint variant status which describes the current deployment stage status or operational status.

            • (dict) --

              Describes the status of the production variant.

              • Status (string) --

                The endpoint variant status which describes the current deployment stage status or operational status.

                • Creating : Creating inference resources for the production variant.

                • Deleting : Terminating inference resources for the production variant.

                • Updating : Updating capacity for the production variant.

                • ActivatingTraffic : Turning on traffic for the production variant.

                • Baking : Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration.

              • StatusMessage (string) --

                A message that describes the status of the production variant.

              • StartTime (datetime) --

                The start time of the current status change.

          • CurrentServerlessConfig (dict) --

            The serverless configuration for the endpoint.

            • MemorySizeInMB (integer) --

              The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

            • MaxConcurrency (integer) --

              The maximum number of concurrent invocations your serverless endpoint can process.

            • ProvisionedConcurrency (integer) --

              The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

          • DesiredServerlessConfig (dict) --

            The serverless configuration requested for this deployment, as specified in the endpoint configuration for the endpoint.

            • MemorySizeInMB (integer) --

              The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

            • MaxConcurrency (integer) --

              The maximum number of concurrent invocations your serverless endpoint can process.

            • ProvisionedConcurrency (integer) --

              The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

      • StartTime (datetime) --

        The start time of the deployment.

      • ShadowProductionVariants (list) --

        An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants for the in-progress deployment.

        • (dict) --

          The production variant summary for a deployment when an endpoint is creating or updating with the CreateEndpoint or UpdateEndpoint operations. Describes the VariantStatus , weight and capacity for a production variant associated with an endpoint.

          • VariantName (string) --

            The name of the variant.

          • DeployedImages (list) --

            An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant .

            • (dict) --

              Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant .

              If you used the registry/repository[:tag] form to specify the image path of the primary container when you created the model hosted in this ProductionVariant , the path resolves to a path of the form registry/repository[@digest] . A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide .

              • SpecifiedImage (string) --

                The image path you specified when you created the model.

              • ResolvedImage (string) --

                The specific digest path of the image hosted in this ProductionVariant .

              • ResolutionTime (datetime) --

                The date and time when the image path for the model resolved to the ResolvedImage

          • CurrentWeight (float) --

            The weight associated with the variant.

          • DesiredWeight (float) --

            The requested weight for the variant in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation.

          • CurrentInstanceCount (integer) --

            The number of instances associated with the variant.

          • DesiredInstanceCount (integer) --

            The number of instances requested in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation.

          • InstanceType (string) --

            The type of instances associated with the variant.

          • AcceleratorType (string) --

            The size of the Elastic Inference (EI) instance to use for the production variant. EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker .

          • VariantStatus (list) --

            The endpoint variant status which describes the current deployment stage status or operational status.

            • (dict) --

              Describes the status of the production variant.

              • Status (string) --

                The endpoint variant status which describes the current deployment stage status or operational status.

                • Creating : Creating inference resources for the production variant.

                • Deleting : Terminating inference resources for the production variant.

                • Updating : Updating capacity for the production variant.

                • ActivatingTraffic : Turning on traffic for the production variant.

                • Baking : Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration.

              • StatusMessage (string) --

                A message that describes the status of the production variant.

              • StartTime (datetime) --

                The start time of the current status change.

          • CurrentServerlessConfig (dict) --

            The serverless configuration for the endpoint.

            • MemorySizeInMB (integer) --

              The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

            • MaxConcurrency (integer) --

              The maximum number of concurrent invocations your serverless endpoint can process.

            • ProvisionedConcurrency (integer) --

              The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

          • DesiredServerlessConfig (dict) --

            The serverless configuration requested for this deployment, as specified in the endpoint configuration for the endpoint.

            • MemorySizeInMB (integer) --

              The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

            • MaxConcurrency (integer) --

              The maximum number of concurrent invocations your serverless endpoint can process.

            • ProvisionedConcurrency (integer) --

              The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

    • ExplainerConfig (dict) --

      The configuration parameters for an explainer.

      • ClarifyExplainerConfig (dict) --

        A member of ExplainerConfig that contains configuration parameters for the SageMaker Clarify explainer.

        • EnableExplanations (string) --

          A JMESPath boolean expression used to filter which records to explain. Explanations are activated by default. See ` EnableExplanations https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html#clarify-online-explainability-create-endpoint-enable`__ for additional information.

        • InferenceConfig (dict) --

          The inference configuration parameter for the model container.

          • FeaturesAttribute (string) --

            Provides the JMESPath expression to extract the features from a model container input in JSON Lines format. For example, if FeaturesAttribute is the JMESPath expression 'myfeatures' , it extracts a list of features [1,2,3] from request data '{"myfeatures":[1,2,3]}' .

          • ContentTemplate (string) --

            A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{"myfeatures":$features}' will format a list of features [1,2,3] into the record string '{"myfeatures":[1,2,3]}' . Required only when the model container input is in JSON Lines format.

          • MaxRecordCount (integer) --

            The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset . A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1 , the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime.

          • MaxPayloadInMB (integer) --

            The maximum payload size (MB) allowed of a request from the explainer to the model container. Defaults to 6 MB.

          • ProbabilityIndex (integer) --

            A zero-based index used to extract a probability value (score) or list from model container output in CSV format. If this value is not provided, the entire model container output will be treated as a probability value (score) or list.

            Example for a single class model: If the model container output consists of a string-formatted prediction label followed by its probability: '1,0.6' , set ProbabilityIndex to 1 to select the probability value 0.6 .

            Example for a multiclass model: If the model container output consists of a string-formatted prediction label followed by its probability: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"' , set ProbabilityIndex to 1 to select the probability values [0.1,0.6,0.3] .

          • LabelIndex (integer) --

            A zero-based index used to extract a label header or list of label headers from model container output in CSV format.

            Example for a multiclass model: If the model container output consists of label headers followed by probabilities: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"' , set LabelIndex to 0 to select the label headers ['cat','dog','fish'] .

          • ProbabilityAttribute (string) --

            A JMESPath expression used to extract the probability (or score) from the model container output if the model container is in JSON Lines format.

            Example : If the model container output of a single request is '{"predicted_label":1,"probability":0.6}' , then set ProbabilityAttribute to 'probability' .

          • LabelAttribute (string) --

            A JMESPath expression used to locate the list of label headers in the model container output.

            Example : If the model container output of a batch request is '{"labels":["cat","dog","fish"],"probability":[0.6,0.3,0.1]}' , then set LabelAttribute to 'labels' to extract the list of label headers ["cat","dog","fish"]

          • LabelHeaders (list) --

            For multiclass classification problems, the label headers are the names of the classes. Otherwise, the label header is the name of the predicted label. These are used to help readability for the output of the InvokeEndpoint API. See the response section under Invoke the endpoint in the Developer Guide for more information. If there are no label headers in the model container output, provide them manually using this parameter.

            • (string) --

          • FeatureHeaders (list) --

            The names of the features. If provided, these are included in the endpoint response payload to help readability of the InvokeEndpoint output. See the Response section under Invoke the endpoint in the Developer Guide for more information.

            • (string) --

          • FeatureTypes (list) --

            A list of data types of the features (optional). Applicable only to NLP explainability. If provided, FeatureTypes must have at least one 'text' string (for example, ['text'] ). If FeatureTypes is not provided, the explainer infers the feature types based on the baseline data. The feature types are included in the endpoint response payload. For additional information see the response section under Invoke the endpoint in the Developer Guide for more information.

            • (string) --

        • ShapConfig (dict) --

          The configuration for SHAP analysis.

          • ShapBaselineConfig (dict) --

            The configuration for the SHAP baseline of the Kernal SHAP algorithm.

            • MimeType (string) --

              The MIME type of the baseline data. Choose from 'text/csv' or 'application/jsonlines' . Defaults to 'text/csv' .

            • ShapBaseline (string) --

              The inline SHAP baseline data in string format. ShapBaseline can have one or multiple records to be used as the baseline dataset. The format of the SHAP baseline file should be the same format as the training dataset. For example, if the training dataset is in CSV format and each record contains four features, and all features are numerical, then the format of the baseline data should also share these characteristics. For natural language processing (NLP) of text columns, the baseline value should be the value used to replace the unit of text specified by the Granularity of the TextConfig parameter. The size limit for ShapBasline is 4 KB. Use the ShapBaselineUri parameter if you want to provide more than 4 KB of baseline data.

            • ShapBaselineUri (string) --

              The uniform resource identifier (URI) of the S3 bucket where the SHAP baseline file is stored. The format of the SHAP baseline file should be the same format as the format of the training dataset. For example, if the training dataset is in CSV format, and each record in the training dataset has four features, and all features are numerical, then the baseline file should also have this same format. Each record should contain only the features. If you are using a virtual private cloud (VPC), the ShapBaselineUri should be accessible to the VPC. For more information about setting up endpoints with Amazon Virtual Private Cloud, see Give SageMaker access to Resources in your Amazon Virtual Private Cloud .

          • NumberOfSamples (integer) --

            The number of samples to be used for analysis by the Kernal SHAP algorithm.

            Note

            The number of samples determines the size of the synthetic dataset, which has an impact on latency of explainability requests. For more information, see the Synthetic data of Configure and create an endpoint .

          • UseLogit (boolean) --

            A Boolean toggle to indicate if you want to use the logit function (true) or log-odds units (false) for model predictions. Defaults to false.

          • Seed (integer) --

            The starting value used to initialize the random number generator in the explainer. Provide a value for this parameter to obtain a deterministic SHAP result.

          • TextConfig (dict) --

            A parameter that indicates if text features are treated as text and explanations are provided for individual units of text. Required for natural language processing (NLP) explainability only.

            • Language (string) --

              Specifies the language of the text features in `ISO 639-1 < https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__ or ISO 639-3 code of a supported language.

              Note

              For a mix of multiple languages, use code 'xx' .

            • Granularity (string) --

              The unit of granularity for the analysis of text features. For example, if the unit is 'token' , then each token (like a word in English) of the text is treated as a feature. SHAP values are computed for each unit/feature.

    • ShadowProductionVariants (list) --

      An array of ProductionVariantSummary objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants .

      • (dict) --

        Describes weight and capacities for a production variant associated with an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities API and the endpoint status is Updating , you get different desired and current values.

        • VariantName (string) --

          The name of the variant.

        • DeployedImages (list) --

          An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant .

          • (dict) --

            Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant .

            If you used the registry/repository[:tag] form to specify the image path of the primary container when you created the model hosted in this ProductionVariant , the path resolves to a path of the form registry/repository[@digest] . A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide .

            • SpecifiedImage (string) --

              The image path you specified when you created the model.

            • ResolvedImage (string) --

              The specific digest path of the image hosted in this ProductionVariant .

            • ResolutionTime (datetime) --

              The date and time when the image path for the model resolved to the ResolvedImage

        • CurrentWeight (float) --

          The weight associated with the variant.

        • DesiredWeight (float) --

          The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request.

        • CurrentInstanceCount (integer) --

          The number of instances associated with the variant.

        • DesiredInstanceCount (integer) --

          The number of instances requested in the UpdateEndpointWeightsAndCapacities request.

        • VariantStatus (list) --

          The endpoint variant status which describes the current deployment stage status or operational status.

          • (dict) --

            Describes the status of the production variant.

            • Status (string) --

              The endpoint variant status which describes the current deployment stage status or operational status.

              • Creating : Creating inference resources for the production variant.

              • Deleting : Terminating inference resources for the production variant.

              • Updating : Updating capacity for the production variant.

              • ActivatingTraffic : Turning on traffic for the production variant.

              • Baking : Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration.

            • StatusMessage (string) --

              A message that describes the status of the production variant.

            • StartTime (datetime) --

              The start time of the current status change.

        • CurrentServerlessConfig (dict) --

          The serverless configuration for the endpoint.

          • MemorySizeInMB (integer) --

            The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

          • MaxConcurrency (integer) --

            The maximum number of concurrent invocations your serverless endpoint can process.

          • ProvisionedConcurrency (integer) --

            The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

        • DesiredServerlessConfig (dict) --

          The serverless configuration requested for the endpoint update.

          • MemorySizeInMB (integer) --

            The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

          • MaxConcurrency (integer) --

            The maximum number of concurrent invocations your serverless endpoint can process.

          • ProvisionedConcurrency (integer) --

            The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency .

DescribeInferenceExperiment (updated) Link ¶
Changes (response)
{'EndpointMetadata': {'EndpointStatus': {'UpdateRollbackFailed'}}}

Returns details about an inference experiment.

See also: AWS API Documentation

Request Syntax

client.describe_inference_experiment(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the inference experiment to describe.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string',
    'Type': 'ShadowMode',
    'Schedule': {
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    },
    'Status': 'Creating'|'Created'|'Updating'|'Running'|'Starting'|'Stopping'|'Completed'|'Cancelled',
    'StatusReason': 'string',
    'Description': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'CompletionTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'RoleArn': 'string',
    'EndpointMetadata': {
        'EndpointName': 'string',
        'EndpointConfigName': 'string',
        'EndpointStatus': 'OutOfService'|'Creating'|'Updating'|'SystemUpdating'|'RollingBack'|'InService'|'Deleting'|'Failed'|'UpdateRollbackFailed',
        'FailureReason': 'string'
    },
    'ModelVariants': [
        {
            'ModelName': 'string',
            'VariantName': 'string',
            'InfrastructureConfig': {
                'InfrastructureType': 'RealTimeInference',
                'RealTimeInferenceConfig': {
                    'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge',
                    'InstanceCount': 123
                }
            },
            'Status': 'Creating'|'Updating'|'InService'|'Deleting'|'Deleted'
        },
    ],
    'DataStorageConfig': {
        'Destination': 'string',
        'KmsKey': 'string',
        'ContentType': {
            'CsvContentTypes': [
                'string',
            ],
            'JsonContentTypes': [
                'string',
            ]
        }
    },
    'ShadowModeConfig': {
        'SourceModelVariantName': 'string',
        'ShadowModelVariants': [
            {
                'ShadowModelVariantName': 'string',
                'SamplingPercentage': 123
            },
        ]
    },
    'KmsKey': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN of the inference experiment being described.

    • Name (string) --

      The name of the inference experiment.

    • Type (string) --

      The type of the inference experiment.

    • Schedule (dict) --

      The duration for which the inference experiment ran or will run.

      • StartTime (datetime) --

        The timestamp at which the inference experiment started or will start.

      • EndTime (datetime) --

        The timestamp at which the inference experiment ended or will end.

    • Status (string) --

      The status of the inference experiment. The following are the possible statuses for an inference experiment:

      • Creating - Amazon SageMaker is creating your experiment.

      • Created - Amazon SageMaker has finished the creation of your experiment and will begin the experiment at the scheduled time.

      • Updating - When you make changes to your experiment, your experiment shows as updating.

      • Starting - Amazon SageMaker is beginning your experiment.

      • Running - Your experiment is in progress.

      • Stopping - Amazon SageMaker is stopping your experiment.

      • Completed - Your experiment has completed.

      • Cancelled - When you conclude your experiment early using the StopInferenceExperiment API, or if any operation fails with an unexpected error, it shows as cancelled.

    • StatusReason (string) --

      The error message or client-specified Reason from the StopInferenceExperiment API, that explains the status of the inference experiment.

    • Description (string) --

      The description of the inference experiment.

    • CreationTime (datetime) --

      The timestamp at which you created the inference experiment.

    • CompletionTime (datetime) --

      The timestamp at which the inference experiment was completed.

    • LastModifiedTime (datetime) --

      The timestamp at which you last modified the inference experiment.

    • RoleArn (string) --

      The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.

    • EndpointMetadata (dict) --

      The metadata of the endpoint on which the inference experiment ran.

      • EndpointName (string) --

        The name of the endpoint.

      • EndpointConfigName (string) --

        The name of the endpoint configuration.

      • EndpointStatus (string) --

        The status of the endpoint. For possible values of the status of an endpoint, see EndpointSummary .

      • FailureReason (string) --

        If the status of the endpoint is Failed , or the status is InService but update operation fails, this provides the reason why it failed.

    • ModelVariants (list) --

      An array of ModelVariantConfigSummary objects. There is one for each variant in the inference experiment. Each ModelVariantConfigSummary object in the array describes the infrastructure configuration for deploying the corresponding variant.

      • (dict) --

        Summary of the deployment configuration of a model.

        • ModelName (string) --

          The name of the Amazon SageMaker Model entity.

        • VariantName (string) --

          The name of the variant.

        • InfrastructureConfig (dict) --

          The configuration of the infrastructure that the model has been deployed to.

          • InfrastructureType (string) --

            The inference option to which to deploy your model. Possible values are the following:

            • RealTime : Deploy to real-time inference.

          • RealTimeInferenceConfig (dict) --

            The infrastructure configuration for deploying the model to real-time inference.

            • InstanceType (string) --

              The instance type the model is deployed to.

            • InstanceCount (integer) --

              The number of instances of the type specified by InstanceType .

        • Status (string) --

          The status of deployment for the model variant on the hosted inference endpoint.

          • Creating - Amazon SageMaker is preparing the model variant on the hosted inference endpoint.

          • InService - The model variant is running on the hosted inference endpoint.

          • Updating - Amazon SageMaker is updating the model variant on the hosted inference endpoint.

          • Deleting - Amazon SageMaker is deleting the model variant on the hosted inference endpoint.

          • Deleted - The model variant has been deleted on the hosted inference endpoint. This can only happen after stopping the experiment.

    • DataStorageConfig (dict) --

      The Amazon S3 location and configuration for storing inference request and response data.

      • Destination (string) --

        The Amazon S3 bucket where the inference request and response data is stored.

      • KmsKey (string) --

        The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.

      • ContentType (dict) --

        Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.

        • CsvContentTypes (list) --

          The list of all content type headers that SageMaker will treat as CSV and capture accordingly.

          • (string) --

        • JsonContentTypes (list) --

          The list of all content type headers that SageMaker will treat as JSON and capture accordingly.

          • (string) --

    • ShadowModeConfig (dict) --

      The configuration of ShadowMode inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates.

      • SourceModelVariantName (string) --

        The name of the production variant, which takes all the inference requests.

      • ShadowModelVariants (list) --

        List of shadow variant configurations.

        • (dict) --

          The name and sampling percentage of a shadow variant.

          • ShadowModelVariantName (string) --

            The name of the shadow variant.

          • SamplingPercentage (integer) --

            The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.

    • KmsKey (string) --

      The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. For more information, see CreateInferenceExperiment .

ListEndpoints (updated) Link ¶
Changes (request, response)
Request
{'StatusEquals': {'UpdateRollbackFailed'}}
Response
{'Endpoints': {'EndpointStatus': {'UpdateRollbackFailed'}}}

Lists endpoints.

See also: AWS API Documentation

Request Syntax

client.list_endpoints(
    SortBy='Name'|'CreationTime'|'Status',
    SortOrder='Ascending'|'Descending',
    NextToken='string',
    MaxResults=123,
    NameContains='string',
    CreationTimeBefore=datetime(2015, 1, 1),
    CreationTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    StatusEquals='OutOfService'|'Creating'|'Updating'|'SystemUpdating'|'RollingBack'|'InService'|'Deleting'|'Failed'|'UpdateRollbackFailed'
)
type SortBy

string

param SortBy

Sorts the list of results. The default is CreationTime .

type SortOrder

string

param SortOrder

The sort order for results. The default is Descending .

type NextToken

string

param NextToken

If the result of a ListEndpoints request was truncated, the response includes a NextToken . To retrieve the next set of endpoints, use the token in the next request.

type MaxResults

integer

param MaxResults

The maximum number of endpoints to return in the response. This value defaults to 10.

type NameContains

string

param NameContains

A string in endpoint names. This filter returns only endpoints whose name contains the specified string.

type CreationTimeBefore

datetime

param CreationTimeBefore

A filter that returns only endpoints that were created before the specified time (timestamp).

type CreationTimeAfter

datetime

param CreationTimeAfter

A filter that returns only endpoints with a creation time greater than or equal to the specified time (timestamp).

type LastModifiedTimeBefore

datetime

param LastModifiedTimeBefore

A filter that returns only endpoints that were modified before the specified timestamp.

type LastModifiedTimeAfter

datetime

param LastModifiedTimeAfter

A filter that returns only endpoints that were modified after the specified timestamp.

type StatusEquals

string

param StatusEquals

A filter that returns only endpoints with the specified status.

rtype

dict

returns

Response Syntax

{
    'Endpoints': [
        {
            'EndpointName': 'string',
            'EndpointArn': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'EndpointStatus': 'OutOfService'|'Creating'|'Updating'|'SystemUpdating'|'RollingBack'|'InService'|'Deleting'|'Failed'|'UpdateRollbackFailed'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Endpoints (list) --

      An array or endpoint objects.

      • (dict) --

        Provides summary information for an endpoint.

        • EndpointName (string) --

          The name of the endpoint.

        • EndpointArn (string) --

          The Amazon Resource Name (ARN) of the endpoint.

        • CreationTime (datetime) --

          A timestamp that shows when the endpoint was created.

        • LastModifiedTime (datetime) --

          A timestamp that shows when the endpoint was last modified.

        • EndpointStatus (string) --

          The status of the endpoint.

          • OutOfService : Endpoint is not available to take incoming requests.

          • Creating : CreateEndpoint is executing.

          • Updating : UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing.

          • SystemUpdating : Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count.

          • RollingBack : Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly.

          • InService : Endpoint is available to process incoming requests.

          • Deleting : DeleteEndpoint is executing.

          • Failed : Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint.

          To get a list of endpoints with a specified status, use the StatusEquals filter with a call to ListEndpoints .

    • NextToken (string) --

      If the response is truncated, SageMaker returns this token. To retrieve the next set of training jobs, use it in the subsequent request.

UpdateEndpoint (updated) Link ¶
Changes (request)
{'DeploymentConfig': {'RollingUpdatePolicy': {'MaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                           '| '
                                                                           'CAPACITY_PERCENT',
                                                                   'Value': 'integer'},
                                              'MaximumExecutionTimeoutInSeconds': 'integer',
                                              'RollbackMaximumBatchSize': {'Type': 'INSTANCE_COUNT '
                                                                                   '| '
                                                                                   'CAPACITY_PERCENT',
                                                                           'Value': 'integer'},
                                              'WaitIntervalInSeconds': 'integer'}}}

Deploys the new EndpointConfig specified in the request, switches to using newly created endpoint, and then deletes resources provisioned for the endpoint using the previous EndpointConfig (there is no availability loss).

When SageMaker receives the request, it sets the endpoint status to Updating . After updating the endpoint, it sets the status to InService . To check the status of an endpoint, use the DescribeEndpoint API.

Note

You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig .

If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.

See also: AWS API Documentation

Request Syntax

client.update_endpoint(
    EndpointName='string',
    EndpointConfigName='string',
    RetainAllVariantProperties=True|False,
    ExcludeRetainedVariantProperties=[
        {
            'VariantPropertyType': 'DesiredInstanceCount'|'DesiredWeight'|'DataCaptureConfig'
        },
    ],
    DeploymentConfig={
        'BlueGreenUpdatePolicy': {
            'TrafficRoutingConfiguration': {
                'Type': 'ALL_AT_ONCE'|'CANARY'|'LINEAR',
                'WaitIntervalInSeconds': 123,
                'CanarySize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                },
                'LinearStepSize': {
                    'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                    'Value': 123
                }
            },
            'TerminationWaitInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123
        },
        'AutoRollbackConfiguration': {
            'Alarms': [
                {
                    'AlarmName': 'string'
                },
            ]
        },
        'RollingUpdatePolicy': {
            'MaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            },
            'WaitIntervalInSeconds': 123,
            'MaximumExecutionTimeoutInSeconds': 123,
            'RollbackMaximumBatchSize': {
                'Type': 'INSTANCE_COUNT'|'CAPACITY_PERCENT',
                'Value': 123
            }
        }
    },
    RetainDeploymentConfig=True|False
)
type EndpointName

string

param EndpointName

[REQUIRED]

The name of the endpoint whose configuration you want to update.

type EndpointConfigName

string

param EndpointConfigName

[REQUIRED]

The name of the new endpoint configuration.

type RetainAllVariantProperties

boolean

param RetainAllVariantProperties

When updating endpoint resources, enables or disables the retention of variant properties , such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating it, set RetainAllVariantProperties to true . To use the variant properties specified in a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to false . The default is false .

type ExcludeRetainedVariantProperties

list

param ExcludeRetainedVariantProperties

When you are updating endpoint resources with RetainAllVariantProperties , whose value is set to true , ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig . If you don't specify a value for ExcludeRetainedVariantProperties , no variant properties are overridden.

  • (dict) --

    Specifies a production variant property type for an Endpoint.

    If you are updating an endpoint with the RetainAllVariantProperties option of UpdateEndpointInput set to true , the VariantProperty objects listed in the ExcludeRetainedVariantProperties parameter of UpdateEndpointInput override the existing variant properties of the endpoint.

    • VariantPropertyType (string) -- [REQUIRED]

      The type of variant property. The supported values are:

      • DesiredInstanceCount : Overrides the existing variant instance counts using the InitialInstanceCount values in the ProductionVariants of CreateEndpointConfig .

      • DesiredWeight : Overrides the existing variant weights using the InitialVariantWeight values in the ProductionVariants of CreateEndpointConfig .

      • DataCaptureConfig : (Not currently supported.)

type DeploymentConfig

dict

param DeploymentConfig

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

  • BlueGreenUpdatePolicy (dict) --

    Update policy for a blue/green deployment. If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default.

    • TrafficRoutingConfiguration (dict) -- [REQUIRED]

      Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.

      • Type (string) -- [REQUIRED]

        Traffic routing strategy type.

        • ALL_AT_ONCE : Endpoint traffic shifts to the new fleet in a single step.

        • CANARY : Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic.

        • LINEAR : Endpoint traffic shifts to the new fleet in n steps of a configurable size.

      • WaitIntervalInSeconds (integer) -- [REQUIRED]

        The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.

      • CanarySize (dict) --

        Batch size for the first step to turn on traffic on the new endpoint fleet. Value must be less than or equal to 50% of the variant's total instance count.

        • Type (string) -- [REQUIRED]

          Specifies the endpoint capacity type.

          • INSTANCE_COUNT : The endpoint activates based on the number of instances.

          • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

        • Value (integer) -- [REQUIRED]

          Defines the capacity size, either as a number of instances or a capacity percentage.

      • LinearStepSize (dict) --

        Batch size for each step to turn on traffic on the new endpoint fleet. Value must be 10-50% of the variant's total instance count.

        • Type (string) -- [REQUIRED]

          Specifies the endpoint capacity type.

          • INSTANCE_COUNT : The endpoint activates based on the number of instances.

          • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

        • Value (integer) -- [REQUIRED]

          Defines the capacity size, either as a number of instances or a capacity percentage.

    • TerminationWaitInSeconds (integer) --

      Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet. Default is 0.

    • MaximumExecutionTimeoutInSeconds (integer) --

      Maximum execution timeout for the deployment. Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .

  • AutoRollbackConfiguration (dict) --

    Automatic rollback configuration for handling endpoint deployment failures and recovery.

    • Alarms (list) --

      List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls back the deployment.

      • (dict) --

        An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.

        • AlarmName (string) --

          The name of a CloudWatch alarm in your account.

  • RollingUpdatePolicy (dict) --

    Specifies a rolling deployment strategy for updating a SageMaker endpoint.

    • MaximumBatchSize (dict) -- [REQUIRED]

      Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant's total instance count.

      • Type (string) -- [REQUIRED]

        Specifies the endpoint capacity type.

        • INSTANCE_COUNT : The endpoint activates based on the number of instances.

        • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

      • Value (integer) -- [REQUIRED]

        Defines the capacity size, either as a number of instances or a capacity percentage.

    • WaitIntervalInSeconds (integer) -- [REQUIRED]

      The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.

    • MaximumExecutionTimeoutInSeconds (integer) --

      The time limit for the total deployment. Exceeding this limit causes a timeout.

    • RollbackMaximumBatchSize (dict) --

      Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.

      • Type (string) -- [REQUIRED]

        Specifies the endpoint capacity type.

        • INSTANCE_COUNT : The endpoint activates based on the number of instances.

        • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

      • Value (integer) -- [REQUIRED]

        Defines the capacity size, either as a number of instances or a capacity percentage.

type RetainDeploymentConfig

boolean

param RetainDeploymentConfig

Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is not reused).

rtype

dict

returns

Response Syntax

{
    'EndpointArn': 'string'
}

Response Structure

  • (dict) --

    • EndpointArn (string) --

      The Amazon Resource Name (ARN) of the endpoint.