Skip to content

Commit a057a33

Browse files
author
AWS
committed
Amazon Bedrock Update: This release of the SDK has the API and documentation for the createcustommodel API. This feature lets you copy a Amazon SageMaker trained Amazon Nova model into Amazon Bedrock for inference.
1 parent af11117 commit a057a33

File tree

2 files changed

+116
-22
lines changed

2 files changed

+116
-22
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Bedrock",
4+
"contributor": "",
5+
"description": "This release of the SDK has the API and documentation for the createcustommodel API. This feature lets you copy a Amazon SageMaker trained Amazon Nova model into Amazon Bedrock for inference."
6+
}

services/bedrock/src/main/resources/codegen-resources/service-2.json

Lines changed: 110 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@
3232
],
3333
"documentation":"<p>Deletes a batch of evaluation jobs. An evaluation job can only be deleted if it has following status <code>FAILED</code>, <code>COMPLETED</code>, and <code>STOPPED</code>. You can request up to 25 model evaluation jobs be deleted in a single request.</p>"
3434
},
35+
"CreateCustomModel":{
36+
"name":"CreateCustomModel",
37+
"http":{
38+
"method":"POST",
39+
"requestUri":"/custom-models/create-custom-model",
40+
"responseCode":200
41+
},
42+
"input":{"shape":"CreateCustomModelRequest"},
43+
"output":{"shape":"CreateCustomModelResponse"},
44+
"errors":[
45+
{"shape":"ResourceNotFoundException"},
46+
{"shape":"AccessDeniedException"},
47+
{"shape":"ValidationException"},
48+
{"shape":"ConflictException"},
49+
{"shape":"InternalServerException"},
50+
{"shape":"TooManyTagsException"},
51+
{"shape":"ServiceQuotaExceededException"},
52+
{"shape":"ThrottlingException"}
53+
],
54+
"documentation":"<p>Creates a new custom model in Amazon Bedrock from an existing SageMaker AI-trained Amazon Nova model stored in an Amazon-managed Amazon S3 bucket. After the model is active, you can use it for inference.</p> <p>To use the model for inference, you must purchase Provisioned Throughput for it. You can't use On-demand inference with these custom models. For more information about Provisioned Throughput, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html\">Provisioned Throughput</a>.</p> <p>The model appears in <code>ListCustomModels</code> with a <code>customizationType</code> of <code>imported</code>. To track the status of the new model, you use the <code>GetCustomModel</code> API operation. The model can be in the following states:</p> <ul> <li> <p> <code>Creating</code> - Initial state during validation and registration</p> </li> <li> <p> <code>Active</code> - Model is ready for use in inference</p> </li> <li> <p> <code>Failed</code> - Creation process encountered an error</p> </li> </ul> <p>For more information about creating custom models, including specific model requirements, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/create-custom-model-from-existing.html\">Import a SageMaker AI-trained Amazon Nova model</a> in the Amazon Bedrock User Guide. </p> <note> <p>You use the <code>CreateCustomModel</code> API to import only SageMaker AI-trained Amazon Nova models. To import open-source models, you use the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html\">CreateModelImportJob</a>. </p> </note> <p> <b>Related APIs</b> </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetCustomModel.html\">GetCustomModel</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListCustomModels.html\">ListCustomModels</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteCustomModel.html\">DeleteCustomModel</a> </p> </li> </ul>"
55+
},
3556
"CreateEvaluationJob":{
3657
"name":"CreateEvaluationJob",
3758
"http":{
@@ -452,7 +473,7 @@
452473
{"shape":"InternalServerException"},
453474
{"shape":"ThrottlingException"}
454475
],
455-
"documentation":"<p>Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html\">Custom models</a> in the <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html\">Amazon Bedrock User Guide</a>.</p>"
476+
"documentation":"<p>Get the properties associated with a Amazon Bedrock custom model that you have created. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html\">Custom models</a> in the <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html\">Amazon Bedrock User Guide</a>.</p>"
456477
},
457478
"GetEvaluationJob":{
458479
"name":"GetEvaluationJob",
@@ -1422,6 +1443,50 @@
14221443
"type":"string",
14231444
"pattern":".*[a-z]{1,20}/.{1,20}.*"
14241445
},
1446+
"CreateCustomModelRequest":{
1447+
"type":"structure",
1448+
"required":[
1449+
"modelName",
1450+
"modelSourceConfig"
1451+
],
1452+
"members":{
1453+
"modelName":{
1454+
"shape":"CustomModelName",
1455+
"documentation":"<p>A unique name for the custom model.</p>"
1456+
},
1457+
"modelSourceConfig":{
1458+
"shape":"ModelDataSource",
1459+
"documentation":"<p>The data source for the model. The Amazon S3 URI in the model source must be for the Amazon-managed Amazon S3 bucket containing your model artifacts. SageMaker AI creates this bucket when you run your first SageMaker AI training job.</p>"
1460+
},
1461+
"modelKmsKeyArn":{
1462+
"shape":"KmsKeyArn",
1463+
"documentation":"<p>The Amazon Resource Name (ARN) of the customer managed KMS key to encrypt the custom model. If you don't provide a KMS key, Amazon Bedrock uses an Amazon Web Services-managed KMS key to encrypt the model. </p> <p>If you provide a customer managed KMS key, your Amazon Bedrock service role must have permissions to use it. For more information see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/encryption-import-model.html\">Encryption of imported models</a>. </p>"
1464+
},
1465+
"roleArn":{
1466+
"shape":"RoleArn",
1467+
"documentation":"<p>The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock assumes to perform tasks on your behalf. This role must have permissions to access the Amazon S3 bucket containing your model artifacts and the KMS key (if specified). For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/model-import-iam-role.html\">Setting up an IAM service role for importing models</a> in the Amazon Bedrock User Guide.</p>"
1468+
},
1469+
"modelTags":{
1470+
"shape":"TagList",
1471+
"documentation":"<p>A list of key-value pairs to associate with the custom model resource. You can use these tags to organize and identify your resources.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html\">Tagging resources</a> in the <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html\">Amazon Bedrock User Guide</a>.</p>"
1472+
},
1473+
"clientRequestToken":{
1474+
"shape":"IdempotencyToken",
1475+
"documentation":"<p>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 <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html\">Ensuring idempotency</a>.</p>",
1476+
"idempotencyToken":true
1477+
}
1478+
}
1479+
},
1480+
"CreateCustomModelResponse":{
1481+
"type":"structure",
1482+
"required":["modelArn"],
1483+
"members":{
1484+
"modelArn":{
1485+
"shape":"ModelArn",
1486+
"documentation":"<p>The Amazon Resource Name (ARN) of the new custom model.</p>"
1487+
}
1488+
}
1489+
},
14251490
"CreateEvaluationJobRequest":{
14261491
"type":"structure",
14271492
"required":[
@@ -2096,7 +2161,7 @@
20962161
"type":"string",
20972162
"max":1011,
20982163
"min":20,
2099-
"pattern":"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-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12}"
2164+
"pattern":"arn:aws(-[^:]+)?: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})"
21002165
},
21012166
"CustomModelName":{
21022167
"type":"string",
@@ -2141,6 +2206,10 @@
21412206
"ownerAccountId":{
21422207
"shape":"AccountId",
21432208
"documentation":"<p>The unique identifier of the account that owns the model.</p>"
2209+
},
2210+
"modelStatus":{
2211+
"shape":"ModelStatus",
2212+
"documentation":"<p>The current status of the custom model. Possible values include:</p> <ul> <li> <p> <code>Creating</code> - The model is being created and validated.</p> </li> <li> <p> <code>Active</code> - The model has been successfully created and is ready for use.</p> </li> <li> <p> <code>Failed</code> - The model creation process failed.</p> </li> </ul>"
21442213
}
21452214
},
21462215
"documentation":"<p>Summary information for a custom model.</p>"
@@ -2183,7 +2252,8 @@
21832252
"enum":[
21842253
"FINE_TUNING",
21852254
"CONTINUED_PRE_TRAINING",
2186-
"DISTILLATION"
2255+
"DISTILLATION",
2256+
"IMPORTED"
21872257
]
21882258
},
21892259
"DataProcessingDetails":{
@@ -3151,10 +3221,6 @@
31513221
"required":[
31523222
"modelArn",
31533223
"modelName",
3154-
"jobArn",
3155-
"baseModelArn",
3156-
"trainingDataConfig",
3157-
"outputDataConfig",
31583224
"creationTime"
31593225
],
31603226
"members":{
@@ -3172,7 +3238,7 @@
31723238
},
31733239
"jobArn":{
31743240
"shape":"ModelCustomizationJobArn",
3175-
"documentation":"<p>Job Amazon Resource Name (ARN) associated with this model.</p>"
3241+
"documentation":"<p>Job Amazon Resource Name (ARN) associated with this model. For models that you create with the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateCustomModel.html\">CreateCustomModel</a> API operation, this is <code>NULL</code>.</p>"
31763242
},
31773243
"baseModelArn":{
31783244
"shape":"ModelArn",
@@ -3217,6 +3283,14 @@
32173283
"customizationConfig":{
32183284
"shape":"CustomizationConfig",
32193285
"documentation":"<p>The customization configuration for the custom model.</p>"
3286+
},
3287+
"modelStatus":{
3288+
"shape":"ModelStatus",
3289+
"documentation":"<p>The current status of the custom model. Possible values include:</p> <ul> <li> <p> <code>Creating</code> - The model is being created and validated.</p> </li> <li> <p> <code>Active</code> - The model has been successfully created and is ready for use.</p> </li> <li> <p> <code>Failed</code> - The model creation process failed. Check the <code>failureMessage</code> field for details.</p> </li> </ul>"
3290+
},
3291+
"failureMessage":{
3292+
"shape":"ErrorMessage",
3293+
"documentation":"<p>A failure message for any issues that occurred when creating the custom model. This is included for only a failed CreateCustomModel operation.</p>"
32203294
}
32213295
}
32223296
},
@@ -3697,14 +3771,14 @@
36973771
"shape":"ModelCustomizationJobStatus",
36983772
"documentation":"<p>The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use. If the job failed, the failure message contains information about why the job failed.</p>"
36993773
},
3700-
"failureMessage":{
3701-
"shape":"ErrorMessage",
3702-
"documentation":"<p>Information about why the job failed.</p>"
3703-
},
37043774
"statusDetails":{
37053775
"shape":"StatusDetails",
37063776
"documentation":"<p>For a Distillation job, the details about the statuses of the sub-tasks of the customization job. </p>"
37073777
},
3778+
"failureMessage":{
3779+
"shape":"ErrorMessage",
3780+
"documentation":"<p>Information about why the job failed.</p>"
3781+
},
37083782
"creationTime":{
37093783
"shape":"Timestamp",
37103784
"documentation":"<p>Time that the resource was created.</p>"
@@ -5706,6 +5780,12 @@
57065780
"documentation":"<p>Return custom models depending on if the current account owns them (<code>true</code>) or if they were shared with the current account (<code>false</code>).</p>",
57075781
"location":"querystring",
57085782
"locationName":"isOwned"
5783+
},
5784+
"modelStatus":{
5785+
"shape":"ModelStatus",
5786+
"documentation":"<p>The status of them model to filter results by. Possible values include:</p> <ul> <li> <p> <code>Creating</code> - Include only models that are currently being created and validated.</p> </li> <li> <p> <code>Active</code> - Include only models that have been successfully created and are ready for use.</p> </li> <li> <p> <code>Failed</code> - Include only models where the creation process failed.</p> </li> </ul> <p>If you don't specify a status, the API returns models in all states.</p>",
5787+
"location":"querystring",
5788+
"locationName":"modelStatus"
57095789
}
57105790
}
57115791
},
@@ -6565,7 +6645,7 @@
65656645
"type":"string",
65666646
"max":1011,
65676647
"min":20,
6568-
"pattern":"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-]{1,63}){0,2})?/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}))"
6648+
"pattern":"arn:aws(-[^:]+)?: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]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}))"
65696649
},
65706650
"ModelCopyJobArn":{
65716651
"type":"string",
@@ -6708,14 +6788,14 @@
67086788
"shape":"ModelCustomizationJobStatus",
67096789
"documentation":"<p>Status of the customization job. </p>"
67106790
},
6711-
"lastModifiedTime":{
6712-
"shape":"Timestamp",
6713-
"documentation":"<p>Time that the customization job was last modified.</p>"
6714-
},
67156791
"statusDetails":{
67166792
"shape":"StatusDetails",
67176793
"documentation":"<p>Details about the status of the data processing sub-task of the job.</p>"
67186794
},
6795+
"lastModifiedTime":{
6796+
"shape":"Timestamp",
6797+
"documentation":"<p>Time that the customization job was last modified.</p>"
6798+
},
67196799
"creationTime":{
67206800
"shape":"Timestamp",
67216801
"documentation":"<p>Creation time of the custom model. </p>"
@@ -6748,10 +6828,10 @@
67486828
"members":{
67496829
"s3DataSource":{
67506830
"shape":"S3DataSource",
6751-
"documentation":"<p>The Amazon S3 data source of the imported model.</p>"
6831+
"documentation":"<p>The Amazon S3 data source of the model to import.</p>"
67526832
}
67536833
},
6754-
"documentation":"<p>Data source for the imported model.</p>",
6834+
"documentation":"<p>The data source of the model to import.</p>",
67556835
"union":true
67566836
},
67576837
"ModelId":{
@@ -6764,7 +6844,7 @@
67646844
"type":"string",
67656845
"max":2048,
67666846
"min":1,
6767-
"pattern":"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-]{1,63}){0,2})?/[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})))|(([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][_-]?)+)"
6847+
"pattern":"arn:aws(-[^:]+)?: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]{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})))|(([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][_-]?)+)"
67686848
},
67696849
"ModelImportJobArn":{
67706850
"type":"string",
@@ -7042,6 +7122,14 @@
70427122
"min":0,
70437123
"pattern":".*arn:aws:sagemaker:.*:hub-content/SageMakerPublicHub/Model/.*"
70447124
},
7125+
"ModelStatus":{
7126+
"type":"string",
7127+
"enum":[
7128+
"Active",
7129+
"Creating",
7130+
"Failed"
7131+
]
7132+
},
70457133
"NonBlankString":{
70467134
"type":"string",
70477135
"pattern":"[\\s\\S]*"
@@ -7685,7 +7773,7 @@
76857773
"documentation":"<p>The URI of the Amazon S3 data source.</p>"
76867774
}
76877775
},
7688-
"documentation":"<p>The Amazon S3 data source of the imported job.</p>"
7776+
"documentation":"<p>The Amazon S3 data source of the model to import. For the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateCustomModel.html\">CreateCustomModel</a> API operation, you must specify the Amazon S3 URI for the Amazon-managed Amazon S3 bucket containing your model artifacts. SageMaker AI creates this bucket when you run your first SageMaker AI training job.</p>"
76897777
},
76907778
"S3InputFormat":{
76917779
"type":"string",
@@ -7962,7 +8050,7 @@
79628050
"type":"string",
79638051
"max":1011,
79648052
"min":20,
7965-
"pattern":".*(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job|custom-model)/[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})$)|(:guardrail/[a-z0-9]+$)|(:automated-reasoning-policy/[a-zA-Z0-9]+(:[a-zA-Z0-9]+)?$)|(:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model|async-invoke|provisioned-model-v2|provisioned-model-reservation|prompt-router)/[a-z0-9]{12}$))).*"
8053+
"pattern":".*(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model/([a-z0-9-]{1,63}[.][a-z0-9-]{1,63}(([:][a-z0-9-]{1,63}){0,2})?|imported)/[a-z0-9]{12}$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job)/[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})$)|(:guardrail/[a-z0-9]+$)|(:automated-reasoning-policy/[a-zA-Z0-9]+(:[a-zA-Z0-9]+)?$)|(:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model|async-invoke|provisioned-model-v2|provisioned-model-reservation|prompt-router|custom-model-deployment)/[a-z0-9]{12}$))).*"
79668054
},
79678055
"TeacherModelConfig":{
79688056
"type":"structure",

0 commit comments

Comments
 (0)