Skip to main content

custom_model_deployments

Creates, updates, deletes, gets or lists a custom_model_deployments resource.

Overview

Namecustom_model_deployments
TypeResource
Idaws.bedrock.custom_model_deployments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time when the custom model deployment was created.
custom_model_deployment_arnstringThe Amazon Resource Name (ARN) of the custom model deployment. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model-deployment/[a-z0-9]{12}</code>)
descriptionstringThe description of the custom model deployment. (pattern: <code>.*</code>)
failure_messagestringIf the deployment status is FAILED, this field contains a message describing the failure reason.
last_updated_atstring (date-time)The date and time when the custom model deployment was last updated.
model_arnstringThe Amazon Resource Name (ARN) of the custom model associated with this deployment. (pattern: <code>arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model/(imported|[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})/[a-z0-9]{12}</code>)
model_deployment_namestringThe name of the custom model deployment. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>)
statusstringThe status of the custom model deployment. Possible values are: CREATING - The deployment is being set up and prepared for inference. ACTIVE - The deployment is ready and available for inference requests. FAILED - The deployment failed to be created or became unavailable. (Creating, Active, Failed)
update_detailsobjectDetails about any pending or completed updates to the custom model deployment, including the new model ARN and update status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_custom_model_deploymentselectcustom_model_deployment_identifier, regionRetrieves information about a custom model deployment, including its status, configuration, and metadata. Use this operation to monitor the deployment status and retrieve details needed for inference requests. The following actions are related to the GetCustomModelDeployment operation: CreateCustomModelDeployment ListCustomModelDeployments DeleteCustomModelDeployment
list_custom_model_deploymentsselectregioncreatedBefore, createdAfter, nameContains, maxResults, nextToken, sortBy, sortOrder, statusEquals, modelArnEqualsLists custom model deployments in your account. You can filter the results by creation time, name, status, and associated model. Use this operation to manage and monitor your custom model deployments. We recommend using pagination to ensure that the operation returns quickly and successfully. The following actions are related to the ListCustomModelDeployments operation: CreateCustomModelDeployment GetCustomModelDeployment DeleteCustomModelDeployment
create_custom_model_deploymentinsertregion, modelDeploymentName, modelArnDeploys 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: GetCustomModelDeployment ListCustomModelDeployments DeleteCustomModelDeployment
update_custom_model_deploymentupdatecustom_model_deployment_identifier, region, modelArnUpdates a custom model deployment with a new custom model. This allows you to deploy updated models without creating new deployment endpoints.
delete_custom_model_deploymentdeletecustom_model_deployment_identifier, regionDeletes a custom model deployment. This operation stops the deployment and removes it from your account. After deletion, the deployment ARN can no longer be used for inference requests. The following actions are related to the DeleteCustomModelDeployment operation: CreateCustomModelDeployment GetCustomModelDeployment ListCustomModelDeployments

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
custom_model_deployment_identifierstringThe Amazon Resource Name (ARN) or name of the custom model deployment to delete.
regionstringAWS region (default: us-east-1)
createdAfterstring (date-time)Filters deployments created after the specified date and time.
createdBeforestring (date-time)Filters deployments created before the specified date and time.
maxResultsintegerThe maximum number of results to return in a single call.
modelArnEqualsstringFilters deployments by the Amazon Resource Name (ARN) of the associated custom model.
nameContainsstringFilters deployments whose names contain the specified string.
nextTokenstringThe token for the next set of results. Use this token to retrieve additional results when the response is truncated.
sortBystringThe field to sort the results by. The only supported value is CreationTime.
sortOrderstringThe sort order for the results. Valid values are Ascending and Descending. Default is Descending.
statusEqualsstringFilters deployments by status. Valid values are CREATING, ACTIVE, and FAILED.

SELECT examples

Retrieves information about a custom model deployment, including its status, configuration, and metadata. Use this operation to monitor the deployment status and retrieve details needed for inference requests. The following actions are related to the GetCustomModelDeployment operation: CreateCustomModelDeployment ListCustomModelDeployments DeleteCustomModelDeployment

SELECT
created_at,
custom_model_deployment_arn,
description,
failure_message,
last_updated_at,
model_arn,
model_deployment_name,
status,
update_details
FROM aws.bedrock.custom_model_deployments
WHERE custom_model_deployment_identifier = '{{ custom_model_deployment_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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: GetCustomModelDeployment ListCustomModelDeployments DeleteCustomModelDeployment

INSERT INTO aws.bedrock.custom_model_deployments (
modelDeploymentName,
modelArn,
description,
tags,
clientRequestToken,
region
)
SELECT
'{{ modelDeploymentName }}' /* required */,
'{{ modelArn }}' /* required */,
'{{ description }}',
'{{ tags }}',
'{{ clientRequestToken }}',
'{{ region }}'
RETURNING
custom_model_deployment_arn
;

UPDATE examples

Updates a custom model deployment with a new custom model. This allows you to deploy updated models without creating new deployment endpoints.

UPDATE aws.bedrock.custom_model_deployments
SET
modelArn = '{{ modelArn }}'
WHERE
custom_model_deployment_identifier = '{{ custom_model_deployment_identifier }}' --required
AND region = '{{ region }}' --required
AND modelArn = '{{ modelArn }}' --required
RETURNING
custom_model_deployment_arn;

DELETE examples

Deletes a custom model deployment. This operation stops the deployment and removes it from your account. After deletion, the deployment ARN can no longer be used for inference requests. The following actions are related to the DeleteCustomModelDeployment operation: CreateCustomModelDeployment GetCustomModelDeployment ListCustomModelDeployments

DELETE FROM aws.bedrock.custom_model_deployments
WHERE custom_model_deployment_identifier = '{{ custom_model_deployment_identifier }}' --required
AND region = '{{ region }}' --required
;