model_invocation_jobs
Creates, updates, deletes, gets or lists a model_invocation_jobs resource.
Overview
| Name | model_invocation_jobs |
| Type | Resource |
| Id | aws.bedrock.model_invocation_jobs |
Fields
The following fields are returned by SELECT queries:
- get_model_invocation_job
- list_model_invocation_jobs
| Name | Datatype | Description |
|---|---|---|
client_request_token | string | A unique, case-sensitive identifier to ensure that the API request 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. (pattern: <code>[a-zA-Z0-9]{1,256}(-*[a-zA-Z0-9]){0,256}</code>) |
end_time | string (date-time) | The time at which the batch inference job ended. |
error_record_count | integer (int64) | The number of records that failed to process in the batch inference job. |
input_data_config | object | Details about the location of the input to the batch inference job. |
job_arn | string | The Amazon Resource Name (ARN) of the batch inference job. (pattern: <code>(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-invocation-job/[a-z0-9]{12})</code>) |
job_expiration_time | string (date-time) | The time at which the batch inference job times or timed out. |
job_name | string | The name of the batch inference job. (pattern: <code>[a-zA-Z0-9]{1,63}(-*[a-zA-Z0-9+-.]){0,63}</code>) |
last_modified_time | string (date-time) | The time at which the batch inference job was last modified. |
message | string | If the batch inference job failed, this field contains a message describing why the job failed. |
model_id | string | The unique identifier of the foundation model used for model inference. (pattern: <code>(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-:]{1,63}/[a-z0-9]{12}$)|(:foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][-]?)+)$)|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][-]?)+)</code>) |
model_invocation_type | string | The invocation endpoint for ModelInvocationJob (InvokeModel, Converse) |
output_data_config | object | Contains the configuration of the S3 location of the output data. |
processed_record_count | integer (int64) | The number of records that have been processed in the batch inference job. |
role_arn | string | The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>) |
status | string | The status of the batch inference job. The following statuses are possible: Submitted – This job has been submitted to a queue for validation. Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: Your IAM service role has access to the Amazon S3 buckets containing your files. Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model. Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. InProgress – This job has begun. You can start viewing the results in the output S3 location. Completed – This job has successfully completed. View the output files in the output S3 location. PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center. Stopped – This job was stopped by a user. Stopping – This job is being stopped by a user. (Submitted, InProgress, Completed, Failed, Stopping, Stopped, PartiallyCompleted, Expired, Validating, Scheduled) |
submit_time | string (date-time) | The time at which the batch inference job was submitted. |
success_record_count | integer (int64) | The number of records that were successfully processed in the batch inference job. |
timeout_duration_in_hours | integer | The number of hours after which batch inference job was set to time out. |
total_record_count | integer (int64) | The total number of records in the batch inference job. |
vpc_config | object | The configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink. |
| Name | Datatype | Description |
|---|---|---|
client_request_token | string | A unique, case-sensitive identifier to ensure that the API request 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. (pattern: <code>[a-zA-Z0-9]{1,256}(-*[a-zA-Z0-9]){0,256}</code>) |
end_time | string (date-time) | The time at which the batch inference job ended. |
error_record_count | integer (int64) | The number of records that failed to process in the batch inference job. |
input_data_config | object | Details about the location of the input to the batch inference job. |
job_arn | string | The Amazon Resource Name (ARN) of the batch inference job. (pattern: <code>(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-invocation-job/[a-z0-9]{12})</code>) |
job_expiration_time | string (date-time) | The time at which the batch inference job times or timed out. |
job_name | string | The name of the batch inference job. (pattern: <code>[a-zA-Z0-9]{1,63}(-*[a-zA-Z0-9+-.]){0,63}</code>) |
last_modified_time | string (date-time) | The time at which the batch inference job was last modified. |
message | string | If the batch inference job failed, this field contains a message describing why the job failed. |
model_id | string | The unique identifier of the foundation model used for model inference. (pattern: <code>(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-:]{1,63}/[a-z0-9]{12}$)|(:foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][-]?)+)$)|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][-]?)+)</code>) |
model_invocation_type | string | The invocation endpoint for ModelInvocationJob (InvokeModel, Converse) |
output_data_config | object | Contains the configuration of the S3 location of the output data. |
processed_record_count | integer (int64) | The number of records that have been processed in the batch inference job. |
role_arn | string | The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>) |
status | string | The status of the batch inference job. The following statuses are possible: Submitted – This job has been submitted to a queue for validation. Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: Your IAM service role has access to the Amazon S3 buckets containing your files. Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model. Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. InProgress – This job has begun. You can start viewing the results in the output S3 location. Completed – This job has successfully completed. View the output files in the output S3 location. PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center. Stopped – This job was stopped by a user. Stopping – This job is being stopped by a user. (Submitted, InProgress, Completed, Failed, Stopping, Stopped, PartiallyCompleted, Expired, Validating, Scheduled) |
submit_time | string (date-time) | The time at which the batch inference job was submitted. |
success_record_count | integer (int64) | The number of records that were successfully processed in the batch inference job. |
timeout_duration_in_hours | integer | The number of hours after which the batch inference job was set to time out. |
total_record_count | integer (int64) | The total number of records in the batch inference job. |
vpc_config | object | The configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_model_invocation_job | select | job_identifier, region | Gets details about a batch inference job. For more information, see Monitor batch inference jobs | |
list_model_invocation_jobs | select | region | submitTimeAfter, submitTimeBefore, statusEquals, nameContains, maxResults, nextToken, sortBy, sortOrder | Lists all batch inference jobs in the account. For more information, see View details about a batch inference job. |
create_model_invocation_job | insert | region, jobName, roleArn, modelId, inputDataConfig, outputDataConfig | Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference. The response returns a jobArn that you can use to stop or get details about the 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.
| Name | Datatype | Description |
|---|---|---|
job_identifier | string | The Amazon Resource Name (ARN) of the batch inference job. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return. If there are more results than the number that you specify, a nextToken value is returned. Use the nextToken in a request to return the next batch of results. |
nameContains | string | Specify a string to filter for batch inference jobs whose names contain the string. |
nextToken | string | If there were more results than the value you specified in the maxResults field in a previous ListModelInvocationJobs request, the response would have returned a nextToken value. To see the next batch of results, send the nextToken value in another request. |
sortBy | string | An attribute by which to sort the results. |
sortOrder | string | Specifies whether to sort the results by ascending or descending order. |
statusEquals | string | Specify a status to filter for batch inference jobs whose statuses match the string you specify. The following statuses are possible: Submitted – This job has been submitted to a queue for validation. Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following: Your IAM service role has access to the Amazon S3 buckets containing your files. Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model. Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock. Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn. Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request. InProgress – This job has begun. You can start viewing the results in the output S3 location. Completed – This job has successfully completed. View the output files in the output S3 location. PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location. Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center. Stopped – This job was stopped by a user. Stopping – This job is being stopped by a user. |
submitTimeAfter | string (date-time) | Specify a time to filter for batch inference jobs that were submitted after the time you specify. |
submitTimeBefore | string (date-time) | Specify a time to filter for batch inference jobs that were submitted before the time you specify. |
SELECT examples
- get_model_invocation_job
- list_model_invocation_jobs
Gets details about a batch inference job. For more information, see Monitor batch inference jobs
SELECT
client_request_token,
end_time,
error_record_count,
input_data_config,
job_arn,
job_expiration_time,
job_name,
last_modified_time,
message,
model_id,
model_invocation_type,
output_data_config,
processed_record_count,
role_arn,
status,
submit_time,
success_record_count,
timeout_duration_in_hours,
total_record_count,
vpc_config
FROM aws.bedrock.model_invocation_jobs
WHERE job_identifier = '{{ job_identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
SELECT
client_request_token,
end_time,
error_record_count,
input_data_config,
job_arn,
job_expiration_time,
job_name,
last_modified_time,
message,
model_id,
model_invocation_type,
output_data_config,
processed_record_count,
role_arn,
status,
submit_time,
success_record_count,
timeout_duration_in_hours,
total_record_count,
vpc_config
FROM aws.bedrock.model_invocation_jobs
WHERE region = '{{ region }}' -- required
AND submitTimeAfter = '{{ submitTimeAfter }}'
AND submitTimeBefore = '{{ submitTimeBefore }}'
AND statusEquals = '{{ statusEquals }}'
AND nameContains = '{{ nameContains }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples
- create_model_invocation_job
- Manifest
Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference. The response returns a jobArn that you can use to stop or get details about the job.
INSERT INTO aws.bedrock.model_invocation_jobs (
jobName,
roleArn,
clientRequestToken,
modelId,
inputDataConfig,
outputDataConfig,
vpcConfig,
timeoutDurationInHours,
tags,
modelInvocationType,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ clientRequestToken }}',
'{{ modelId }}' /* required */,
'{{ inputDataConfig }}' /* required */,
'{{ outputDataConfig }}' /* required */,
'{{ vpcConfig }}',
{{ timeoutDurationInHours }},
'{{ tags }}',
'{{ modelInvocationType }}',
'{{ region }}'
RETURNING
job_arn
;
# Description fields are for documentation purposes
- name: model_invocation_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the model_invocation_jobs resource.
- name: jobName
value: "{{ jobName }}"
- name: roleArn
value: "{{ roleArn }}"
- name: clientRequestToken
value: "{{ clientRequestToken }}"
- name: modelId
value: "{{ modelId }}"
- name: inputDataConfig
description: |
Details about the location of the input to the batch inference job.
value:
s3InputDataConfig:
s3InputFormat: "{{ s3InputFormat }}"
s3Uri: "{{ s3Uri }}"
s3BucketOwner: "{{ s3BucketOwner }}"
- name: outputDataConfig
description: |
Contains the configuration of the S3 location of the output data.
value:
s3OutputDataConfig:
s3Uri: "{{ s3Uri }}"
s3EncryptionKeyId: "{{ s3EncryptionKeyId }}"
s3BucketOwner: "{{ s3BucketOwner }}"
- name: vpcConfig
description: |
The configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink.
value:
subnetIds:
- "{{ subnetIds }}"
securityGroupIds:
- "{{ securityGroupIds }}"
- name: timeoutDurationInHours
value: {{ timeoutDurationInHours }}
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: modelInvocationType
value: "{{ modelInvocationType }}"
valid_values: ['InvokeModel', 'Converse']