Skip to content

Bedrock  >  Operations  >  create_custom_model_deployment

create_custom_model_deployment

Operation

create_custom_model_deployment async

create_custom_model_deployment(input: CreateCustomModelDeploymentInput, plugins: list[Plugin] | None = None) -> CreateCustomModelDeploymentOutput

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:

Parameters:

Name Type Description Default
input CreateCustomModelDeploymentInput

An instance of CreateCustomModelDeploymentInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateCustomModelDeploymentOutput

An instance of CreateCustomModelDeploymentOutput.

Input

CreateCustomModelDeploymentInput dataclass

Dataclass for CreateCustomModelDeploymentInput structure.

Attributes

client_request_token class-attribute instance-attribute
client_request_token: str | None = None

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.

description class-attribute instance-attribute
description: str | None = None

A description for the custom model deployment to help you identify its purpose.

model_arn class-attribute instance-attribute
model_arn: str | None = None

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

model_deployment_name class-attribute instance-attribute
model_deployment_name: str | None = None

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

tags class-attribute instance-attribute
tags: list[Tag] | None = None

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.

Output

CreateCustomModelDeploymentOutput dataclass

Dataclass for CreateCustomModelDeploymentOutput structure.

Attributes

custom_model_deployment_arn instance-attribute
custom_model_deployment_arn: str

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.