Bedrock / Client / create_custom_model_deployment

create_custom_model_deployment

Bedrock.Client.create_custom_model_deployment(**kwargs)

Deploys a custom model for on-demand inference in Amazon Bedrock. After you deploy your custom model, you use the deployment’s Amazon Resource Name (ARN) as the modelId parameter when you submit prompts and generate responses with model inference.

For more information about setting up on-demand inference for custom models, see Set up inference for a custom model.

The following actions are related to the CreateCustomModelDeployment operation:

See also: AWS API Documentation

Request Syntax

response = client.create_custom_model_deployment(
    modelDeploymentName='string',
    modelArn='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    clientRequestToken='string'
)
Parameters:
  • modelDeploymentName (string) –

    [REQUIRED]

    The name for the custom model deployment. The name must be unique within your Amazon Web Services account and Region.

  • modelArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the custom model to deploy for on-demand inference. The custom model must be in the Active state.

  • description (string) – A description for the custom model deployment to help you identify its purpose.

  • tags (list) –

    Tags to assign to the custom model deployment. You can use tags to organize and track your Amazon Web Services resources for cost allocation and management purposes.

    • (dict) –

      Definition of the key/value pair for a tag.

      • key (string) – [REQUIRED]

        Key for the tag.

      • value (string) – [REQUIRED]

        Value for the tag.

  • clientRequestToken (string) –

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'customModelDeploymentArn': 'string'
}

Response Structure

  • (dict) –

    • customModelDeploymentArn (string) –

      The Amazon Resource Name (ARN) of the custom model deployment. Use this ARN as the modelId parameter when invoking the model with the InvokeModel or Converse operations.

Exceptions

  • Bedrock.Client.exceptions.ResourceNotFoundException

  • Bedrock.Client.exceptions.AccessDeniedException

  • Bedrock.Client.exceptions.ValidationException

  • Bedrock.Client.exceptions.InternalServerException

  • Bedrock.Client.exceptions.TooManyTagsException

  • Bedrock.Client.exceptions.ServiceQuotaExceededException

  • Bedrock.Client.exceptions.ThrottlingException