Skip to main content

ai_recommendation_jobs

Creates, updates, deletes, gets or lists an ai_recommendation_jobs resource.

Overview

Nameai_recommendation_jobs
TypeResource
Idaws.sagemaker.ai_recommendation_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ai_recommendation_job_arnstringThe Amazon Resource Name (ARN) of the AI recommendation job. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:ai-recommendation-job/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
ai_recommendation_job_namestringThe name of the AI recommendation job. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
ai_recommendation_job_statusstringThe status of the AI recommendation job. (InProgress, Completed, Failed, Stopping, Stopped)
ai_workload_config_identifierstringThe name or Amazon Resource Name (ARN) of the AI workload configuration used for this recommendation job. (pattern: <code>(arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:[a-z-]*/)?([a-zA-Z0-9]([a-zA-Z0-9-]){0,62})(?<!-)</code>)
adapter_sourceobjectThe LoRA adapter source that you specified when you created the recommendation job. This field is absent when you created the job without LoRA adapters.
compute_specobjectThe compute resource specification for the recommendation job.
creation_timestring (date-time)A timestamp that indicates when the recommendation job was created.
end_timestring (date-time)A timestamp that indicates when the recommendation job completed.
failure_reasonstringIf the recommendation job failed, the reason it failed.
inference_specificationobjectThe inference framework configuration.
model_sourceobjectThe source of the model that was analyzed.
optimize_modelbooleanWhether model optimization techniques were allowed.
output_configobjectThe output configuration for the recommendation job.
performance_targetobjectThe performance targets specified for the recommendation job.
recommendationsarrayThe list of optimization recommendations generated by the job. Each recommendation includes optimization details, deployment configuration, expected performance metrics, and the associated benchmark job ARN.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role used by the recommendation job. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
start_timestring (date-time)A timestamp that indicates when the recommendation job started running.
tagsarrayThe tags associated with the recommendation job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_ai_recommendation_jobselectregionReturns details of an AI recommendation job, including its status, model source, performance targets, optimization recommendations, and deployment configurations.
list_ai_recommendation_jobsselectregionReturns a list of AI recommendation jobs in your account. You can filter the results by name, status, and creation time, and sort the results. The response is paginated.
create_ai_recommendation_jobinsertregion, AIRecommendationJobName, ModelSource, OutputConfig, AIWorkloadConfigIdentifier, PerformanceTarget, RoleArnCreates a recommendation job that generates intelligent optimization recommendations for generative AI inference deployments. The job analyzes your model, workload configuration, and performance targets to recommend optimal instance types, model optimization techniques (such as quantization and speculative decoding), and deployment configurations.
delete_ai_recommendation_jobdeleteregionDeletes the specified AI recommendation job.
stop_ai_recommendation_jobexecregion, AIRecommendationJobNameStops a running AI recommendation job.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns details of an AI recommendation job, including its status, model source, performance targets, optimization recommendations, and deployment configurations.

SELECT
ai_recommendation_job_arn,
ai_recommendation_job_name,
ai_recommendation_job_status,
ai_workload_config_identifier,
adapter_source,
compute_spec,
creation_time,
end_time,
failure_reason,
inference_specification,
model_source,
optimize_model,
output_config,
performance_target,
recommendations,
role_arn,
start_time,
tags
FROM aws.sagemaker.ai_recommendation_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a recommendation job that generates intelligent optimization recommendations for generative AI inference deployments. The job analyzes your model, workload configuration, and performance targets to recommend optimal instance types, model optimization techniques (such as quantization and speculative decoding), and deployment configurations.

INSERT INTO aws.sagemaker.ai_recommendation_jobs (
AIRecommendationJobName,
ModelSource,
OutputConfig,
AIWorkloadConfigIdentifier,
PerformanceTarget,
RoleArn,
InferenceSpecification,
OptimizeModel,
ComputeSpec,
AdapterSource,
Tags,
region
)
SELECT
'{{ AIRecommendationJobName }}' /* required */,
'{{ ModelSource }}' /* required */,
'{{ OutputConfig }}' /* required */,
'{{ AIWorkloadConfigIdentifier }}' /* required */,
'{{ PerformanceTarget }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ InferenceSpecification }}',
{{ OptimizeModel }},
'{{ ComputeSpec }}',
'{{ AdapterSource }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
ai_recommendation_job_arn
;

DELETE examples

Deletes the specified AI recommendation job.

DELETE FROM aws.sagemaker.ai_recommendation_jobs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Stops a running AI recommendation job.

EXEC aws.sagemaker.ai_recommendation_jobs.stop_ai_recommendation_job
@region='{{ region }}' --required
@@json=
'{
"AIRecommendationJobName": "{{ AIRecommendationJobName }}"
}'
;