aws.bedrock.CustomModel
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.bedrockfoundation.getModel({
modelId: "amazon.titan-text-express-v1",
});
const exampleCustomModel = new aws.bedrock.CustomModel("example", {
customModelName: "example-model",
jobName: "example-job-1",
baseModelIdentifier: example.then(example => example.modelArn),
roleArn: exampleAwsIamRole.arn,
hyperparameters: {
epochCount: "1",
batchSize: "1",
learningRate: "0.005",
learningRateWarmupSteps: "0",
},
outputDataConfig: {
s3Uri: `s3://${output.id}/data/`,
},
trainingDataConfig: {
s3Uri: `s3://${training.id}/data/train.jsonl`,
},
});
import pulumi
import pulumi_aws as aws
example = aws.bedrockfoundation.get_model(model_id="amazon.titan-text-express-v1")
example_custom_model = aws.bedrock.CustomModel("example",
custom_model_name="example-model",
job_name="example-job-1",
base_model_identifier=example.model_arn,
role_arn=example_aws_iam_role["arn"],
hyperparameters={
"epochCount": "1",
"batchSize": "1",
"learningRate": "0.005",
"learningRateWarmupSteps": "0",
},
output_data_config={
"s3_uri": f"s3://{output['id']}/data/",
},
training_data_config={
"s3_uri": f"s3://{training['id']}/data/train.jsonl",
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := bedrockfoundation.GetModel(ctx, &bedrockfoundation.GetModelArgs{
ModelId: "amazon.titan-text-express-v1",
}, nil)
if err != nil {
return err
}
_, err = bedrock.NewCustomModel(ctx, "example", &bedrock.CustomModelArgs{
CustomModelName: pulumi.String("example-model"),
JobName: pulumi.String("example-job-1"),
BaseModelIdentifier: pulumi.String(example.ModelArn),
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
Hyperparameters: pulumi.StringMap{
"epochCount": pulumi.String("1"),
"batchSize": pulumi.String("1"),
"learningRate": pulumi.String("0.005"),
"learningRateWarmupSteps": pulumi.String("0"),
},
OutputDataConfig: &bedrock.CustomModelOutputDataConfigArgs{
S3Uri: pulumi.Sprintf("s3://%v/data/", output.Id),
},
TrainingDataConfig: &bedrock.CustomModelTrainingDataConfigArgs{
S3Uri: pulumi.Sprintf("s3://%v/data/train.jsonl", training.Id),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.BedrockFoundation.GetModel.Invoke(new()
{
ModelId = "amazon.titan-text-express-v1",
});
var exampleCustomModel = new Aws.Bedrock.CustomModel("example", new()
{
CustomModelName = "example-model",
JobName = "example-job-1",
BaseModelIdentifier = example.Apply(getModelResult => getModelResult.ModelArn),
RoleArn = exampleAwsIamRole.Arn,
Hyperparameters =
{
{ "epochCount", "1" },
{ "batchSize", "1" },
{ "learningRate", "0.005" },
{ "learningRateWarmupSteps", "0" },
},
OutputDataConfig = new Aws.Bedrock.Inputs.CustomModelOutputDataConfigArgs
{
S3Uri = $"s3://{output.Id}/data/",
},
TrainingDataConfig = new Aws.Bedrock.Inputs.CustomModelTrainingDataConfigArgs
{
S3Uri = $"s3://{training.Id}/data/train.jsonl",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;
import com.pulumi.aws.bedrockfoundation.inputs.GetModelArgs;
import com.pulumi.aws.bedrock.CustomModel;
import com.pulumi.aws.bedrock.CustomModelArgs;
import com.pulumi.aws.bedrock.inputs.CustomModelOutputDataConfigArgs;
import com.pulumi.aws.bedrock.inputs.CustomModelTrainingDataConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = BedrockfoundationFunctions.getModel(GetModelArgs.builder()
.modelId("amazon.titan-text-express-v1")
.build());
var exampleCustomModel = new CustomModel("exampleCustomModel", CustomModelArgs.builder()
.customModelName("example-model")
.jobName("example-job-1")
.baseModelIdentifier(example.applyValue(getModelResult -> getModelResult.modelArn()))
.roleArn(exampleAwsIamRole.arn())
.hyperparameters(Map.ofEntries(
Map.entry("epochCount", "1"),
Map.entry("batchSize", "1"),
Map.entry("learningRate", "0.005"),
Map.entry("learningRateWarmupSteps", "0")
))
.outputDataConfig(CustomModelOutputDataConfigArgs.builder()
.s3Uri(String.format("s3://%s/data/", output.id()))
.build())
.trainingDataConfig(CustomModelTrainingDataConfigArgs.builder()
.s3Uri(String.format("s3://%s/data/train.jsonl", training.id()))
.build())
.build());
}
}
resources:
exampleCustomModel:
type: aws:bedrock:CustomModel
name: example
properties:
customModelName: example-model
jobName: example-job-1
baseModelIdentifier: ${example.modelArn}
roleArn: ${exampleAwsIamRole.arn}
hyperparameters:
epochCount: '1'
batchSize: '1'
learningRate: '0.005'
learningRateWarmupSteps: '0'
outputDataConfig:
s3Uri: s3://${output.id}/data/
trainingDataConfig:
s3Uri: s3://${training.id}/data/train.jsonl
variables:
example:
fn::invoke:
Function: aws:bedrockfoundation:getModel
Arguments:
modelId: amazon.titan-text-express-v1
Create CustomModel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomModel(name: string, args: CustomModelArgs, opts?: CustomResourceOptions);
@overload
def CustomModel(resource_name: str,
args: CustomModelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomModel(resource_name: str,
opts: Optional[ResourceOptions] = None,
job_name: Optional[str] = None,
role_arn: Optional[str] = None,
custom_model_name: Optional[str] = None,
base_model_identifier: Optional[str] = None,
hyperparameters: Optional[Mapping[str, str]] = None,
output_data_config: Optional[CustomModelOutputDataConfigArgs] = None,
customization_type: Optional[str] = None,
custom_model_kms_key_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[CustomModelTimeoutsArgs] = None,
training_data_config: Optional[CustomModelTrainingDataConfigArgs] = None,
validation_data_config: Optional[CustomModelValidationDataConfigArgs] = None,
vpc_config: Optional[CustomModelVpcConfigArgs] = None)
func NewCustomModel(ctx *Context, name string, args CustomModelArgs, opts ...ResourceOption) (*CustomModel, error)
public CustomModel(string name, CustomModelArgs args, CustomResourceOptions? opts = null)
public CustomModel(String name, CustomModelArgs args)
public CustomModel(String name, CustomModelArgs args, CustomResourceOptions options)
type: aws:bedrock:CustomModel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CustomModelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomModelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomModelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomModelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomModelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var customModelResource = new Aws.Bedrock.CustomModel("customModelResource", new()
{
JobName = "string",
RoleArn = "string",
CustomModelName = "string",
BaseModelIdentifier = "string",
Hyperparameters =
{
{ "string", "string" },
},
OutputDataConfig = new Aws.Bedrock.Inputs.CustomModelOutputDataConfigArgs
{
S3Uri = "string",
},
CustomizationType = "string",
CustomModelKmsKeyId = "string",
Tags =
{
{ "string", "string" },
},
Timeouts = new Aws.Bedrock.Inputs.CustomModelTimeoutsArgs
{
Create = "string",
Delete = "string",
},
TrainingDataConfig = new Aws.Bedrock.Inputs.CustomModelTrainingDataConfigArgs
{
S3Uri = "string",
},
ValidationDataConfig = new Aws.Bedrock.Inputs.CustomModelValidationDataConfigArgs
{
Validators = new[]
{
new Aws.Bedrock.Inputs.CustomModelValidationDataConfigValidatorArgs
{
S3Uri = "string",
},
},
},
VpcConfig = new Aws.Bedrock.Inputs.CustomModelVpcConfigArgs
{
SecurityGroupIds = new[]
{
"string",
},
SubnetIds = new[]
{
"string",
},
},
});
example, err := bedrock.NewCustomModel(ctx, "customModelResource", &bedrock.CustomModelArgs{
JobName: pulumi.String("string"),
RoleArn: pulumi.String("string"),
CustomModelName: pulumi.String("string"),
BaseModelIdentifier: pulumi.String("string"),
Hyperparameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
OutputDataConfig: &bedrock.CustomModelOutputDataConfigArgs{
S3Uri: pulumi.String("string"),
},
CustomizationType: pulumi.String("string"),
CustomModelKmsKeyId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &bedrock.CustomModelTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
TrainingDataConfig: &bedrock.CustomModelTrainingDataConfigArgs{
S3Uri: pulumi.String("string"),
},
ValidationDataConfig: &bedrock.CustomModelValidationDataConfigArgs{
Validators: bedrock.CustomModelValidationDataConfigValidatorArray{
&bedrock.CustomModelValidationDataConfigValidatorArgs{
S3Uri: pulumi.String("string"),
},
},
},
VpcConfig: &bedrock.CustomModelVpcConfigArgs{
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
},
})
var customModelResource = new CustomModel("customModelResource", CustomModelArgs.builder()
.jobName("string")
.roleArn("string")
.customModelName("string")
.baseModelIdentifier("string")
.hyperparameters(Map.of("string", "string"))
.outputDataConfig(CustomModelOutputDataConfigArgs.builder()
.s3Uri("string")
.build())
.customizationType("string")
.customModelKmsKeyId("string")
.tags(Map.of("string", "string"))
.timeouts(CustomModelTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.trainingDataConfig(CustomModelTrainingDataConfigArgs.builder()
.s3Uri("string")
.build())
.validationDataConfig(CustomModelValidationDataConfigArgs.builder()
.validators(CustomModelValidationDataConfigValidatorArgs.builder()
.s3Uri("string")
.build())
.build())
.vpcConfig(CustomModelVpcConfigArgs.builder()
.securityGroupIds("string")
.subnetIds("string")
.build())
.build());
custom_model_resource = aws.bedrock.CustomModel("customModelResource",
job_name="string",
role_arn="string",
custom_model_name="string",
base_model_identifier="string",
hyperparameters={
"string": "string",
},
output_data_config={
"s3Uri": "string",
},
customization_type="string",
custom_model_kms_key_id="string",
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
},
training_data_config={
"s3Uri": "string",
},
validation_data_config={
"validators": [{
"s3Uri": "string",
}],
},
vpc_config={
"securityGroupIds": ["string"],
"subnetIds": ["string"],
})
const customModelResource = new aws.bedrock.CustomModel("customModelResource", {
jobName: "string",
roleArn: "string",
customModelName: "string",
baseModelIdentifier: "string",
hyperparameters: {
string: "string",
},
outputDataConfig: {
s3Uri: "string",
},
customizationType: "string",
customModelKmsKeyId: "string",
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
},
trainingDataConfig: {
s3Uri: "string",
},
validationDataConfig: {
validators: [{
s3Uri: "string",
}],
},
vpcConfig: {
securityGroupIds: ["string"],
subnetIds: ["string"],
},
});
type: aws:bedrock:CustomModel
properties:
baseModelIdentifier: string
customModelKmsKeyId: string
customModelName: string
customizationType: string
hyperparameters:
string: string
jobName: string
outputDataConfig:
s3Uri: string
roleArn: string
tags:
string: string
timeouts:
create: string
delete: string
trainingDataConfig:
s3Uri: string
validationDataConfig:
validators:
- s3Uri: string
vpcConfig:
securityGroupIds:
- string
subnetIds:
- string
CustomModel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CustomModel resource accepts the following input properties:
- Base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- Custom
Model stringName - Name for the custom model.
- Hyperparameters Dictionary<string, string>
- Parameters related to tuning the model.
- Job
Name string - A name for the customization job.
- Role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- Customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - Output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- Dictionary<string, string>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Custom
Model Timeouts - Training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- Validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- Vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- Base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- Custom
Model stringName - Name for the custom model.
- Hyperparameters map[string]string
- Parameters related to tuning the model.
- Job
Name string - A name for the customization job.
- Role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- Customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - Output
Data CustomConfig Model Output Data Config Args - S3 location for the output data.
- map[string]string
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Custom
Model Timeouts Args - Training
Data CustomConfig Model Training Data Config Args - Information about the training dataset.
- Validation
Data CustomConfig Model Validation Data Config Args - Information about the validation dataset.
- Vpc
Config CustomModel Vpc Config Args - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model StringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model StringName - Name for the custom model.
- hyperparameters Map<String,String>
- Parameters related to tuning the model.
- job
Name String - A name for the customization job.
- role
Arn String - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- custom
Model StringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- customization
Type String - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- Map<String,String>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Custom
Model Timeouts - training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model stringName - Name for the custom model.
- hyperparameters {[key: string]: string}
- Parameters related to tuning the model.
- job
Name string - A name for the customization job.
- role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- {[key: string]: string}
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Custom
Model Timeouts - training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base_
model_ stridentifier - The Amazon Resource Name (ARN) of the base model.
- custom_
model_ strname - Name for the custom model.
- hyperparameters Mapping[str, str]
- Parameters related to tuning the model.
- job_
name str - A name for the customization job.
- role_
arn str - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- custom_
model_ strkms_ key_ id - The custom model is encrypted at rest using this key. Specify the key ARN.
- customization_
type str - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - output_
data_ Customconfig Model Output Data Config Args - S3 location for the output data.
- Mapping[str, str]
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Custom
Model Timeouts Args - training_
data_ Customconfig Model Training Data Config Args - Information about the training dataset.
- validation_
data_ Customconfig Model Validation Data Config Args - Information about the validation dataset.
- vpc_
config CustomModel Vpc Config Args - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model StringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model StringName - Name for the custom model.
- hyperparameters Map<String>
- Parameters related to tuning the model.
- job
Name String - A name for the customization job.
- role
Arn String - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- custom
Model StringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- customization
Type String - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - output
Data Property MapConfig - S3 location for the output data.
- Map<String>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts Property Map
- training
Data Property MapConfig - Information about the training dataset.
- validation
Data Property MapConfig - Information about the validation dataset.
- vpc
Config Property Map - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomModel resource produces the following output properties:
- Custom
Model stringArn - The ARN of the output model.
- Id string
- The provider-assigned unique ID for this managed resource.
- Job
Arn string - The ARN of the customization job.
- Job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Training
Metrics List<CustomModel Training Metric> - Metrics associated with the customization job.
- Validation
Metrics List<CustomModel Validation Metric> - The loss metric for each validator that you provided.
- Custom
Model stringArn - The ARN of the output model.
- Id string
- The provider-assigned unique ID for this managed resource.
- Job
Arn string - The ARN of the customization job.
- Job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Training
Metrics []CustomModel Training Metric - Metrics associated with the customization job.
- Validation
Metrics []CustomModel Validation Metric - The loss metric for each validator that you provided.
- custom
Model StringArn - The ARN of the output model.
- id String
- The provider-assigned unique ID for this managed resource.
- job
Arn String - The ARN of the customization job.
- job
Status String - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - training
Metrics List<CustomModel Training Metric> - Metrics associated with the customization job.
- validation
Metrics List<CustomModel Validation Metric> - The loss metric for each validator that you provided.
- custom
Model stringArn - The ARN of the output model.
- id string
- The provider-assigned unique ID for this managed resource.
- job
Arn string - The ARN of the customization job.
- job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - training
Metrics CustomModel Training Metric[] - Metrics associated with the customization job.
- validation
Metrics CustomModel Validation Metric[] - The loss metric for each validator that you provided.
- custom_
model_ strarn - The ARN of the output model.
- id str
- The provider-assigned unique ID for this managed resource.
- job_
arn str - The ARN of the customization job.
- job_
status str - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - training_
metrics Sequence[CustomModel Training Metric] - Metrics associated with the customization job.
- validation_
metrics Sequence[CustomModel Validation Metric] - The loss metric for each validator that you provided.
- custom
Model StringArn - The ARN of the output model.
- id String
- The provider-assigned unique ID for this managed resource.
- job
Arn String - The ARN of the customization job.
- job
Status String - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - training
Metrics List<Property Map> - Metrics associated with the customization job.
- validation
Metrics List<Property Map> - The loss metric for each validator that you provided.
Look up Existing CustomModel Resource
Get an existing CustomModel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CustomModelState, opts?: CustomResourceOptions): CustomModel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
base_model_identifier: Optional[str] = None,
custom_model_arn: Optional[str] = None,
custom_model_kms_key_id: Optional[str] = None,
custom_model_name: Optional[str] = None,
customization_type: Optional[str] = None,
hyperparameters: Optional[Mapping[str, str]] = None,
job_arn: Optional[str] = None,
job_name: Optional[str] = None,
job_status: Optional[str] = None,
output_data_config: Optional[CustomModelOutputDataConfigArgs] = None,
role_arn: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
timeouts: Optional[CustomModelTimeoutsArgs] = None,
training_data_config: Optional[CustomModelTrainingDataConfigArgs] = None,
training_metrics: Optional[Sequence[CustomModelTrainingMetricArgs]] = None,
validation_data_config: Optional[CustomModelValidationDataConfigArgs] = None,
validation_metrics: Optional[Sequence[CustomModelValidationMetricArgs]] = None,
vpc_config: Optional[CustomModelVpcConfigArgs] = None) -> CustomModel
func GetCustomModel(ctx *Context, name string, id IDInput, state *CustomModelState, opts ...ResourceOption) (*CustomModel, error)
public static CustomModel Get(string name, Input<string> id, CustomModelState? state, CustomResourceOptions? opts = null)
public static CustomModel get(String name, Output<String> id, CustomModelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- Custom
Model stringArn - The ARN of the output model.
- Custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- Custom
Model stringName - Name for the custom model.
- Customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - Hyperparameters Dictionary<string, string>
- Parameters related to tuning the model.
- Job
Arn string - The ARN of the customization job.
- Job
Name string - A name for the customization job.
- Job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- Role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Dictionary<string, string>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Custom
Model Timeouts - Training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- Training
Metrics List<CustomModel Training Metric> - Metrics associated with the customization job.
- Validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- Validation
Metrics List<CustomModel Validation Metric> - The loss metric for each validator that you provided.
- Vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- Base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- Custom
Model stringArn - The ARN of the output model.
- Custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- Custom
Model stringName - Name for the custom model.
- Customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - Hyperparameters map[string]string
- Parameters related to tuning the model.
- Job
Arn string - The ARN of the customization job.
- Job
Name string - A name for the customization job.
- Job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - Output
Data CustomConfig Model Output Data Config Args - S3 location for the output data.
- Role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- map[string]string
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Custom
Model Timeouts Args - Training
Data CustomConfig Model Training Data Config Args - Information about the training dataset.
- Training
Metrics []CustomModel Training Metric Args - Metrics associated with the customization job.
- Validation
Data CustomConfig Model Validation Data Config Args - Information about the validation dataset.
- Validation
Metrics []CustomModel Validation Metric Args - The loss metric for each validator that you provided.
- Vpc
Config CustomModel Vpc Config Args - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model StringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model StringArn - The ARN of the output model.
- custom
Model StringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- custom
Model StringName - Name for the custom model.
- customization
Type String - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - hyperparameters Map<String,String>
- Parameters related to tuning the model.
- job
Arn String - The ARN of the customization job.
- job
Name String - A name for the customization job.
- job
Status String - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- role
Arn String - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Map<String,String>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Custom
Model Timeouts - training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- training
Metrics List<CustomModel Training Metric> - Metrics associated with the customization job.
- validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- validation
Metrics List<CustomModel Validation Metric> - The loss metric for each validator that you provided.
- vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model stringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model stringArn - The ARN of the output model.
- custom
Model stringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- custom
Model stringName - Name for the custom model.
- customization
Type string - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - hyperparameters {[key: string]: string}
- Parameters related to tuning the model.
- job
Arn string - The ARN of the customization job.
- job
Name string - A name for the customization job.
- job
Status string - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - output
Data CustomConfig Model Output Data Config - S3 location for the output data.
- role
Arn string - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- {[key: string]: string}
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Custom
Model Timeouts - training
Data CustomConfig Model Training Data Config - Information about the training dataset.
- training
Metrics CustomModel Training Metric[] - Metrics associated with the customization job.
- validation
Data CustomConfig Model Validation Data Config - Information about the validation dataset.
- validation
Metrics CustomModel Validation Metric[] - The loss metric for each validator that you provided.
- vpc
Config CustomModel Vpc Config - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base_
model_ stridentifier - The Amazon Resource Name (ARN) of the base model.
- custom_
model_ strarn - The ARN of the output model.
- custom_
model_ strkms_ key_ id - The custom model is encrypted at rest using this key. Specify the key ARN.
- custom_
model_ strname - Name for the custom model.
- customization_
type str - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - hyperparameters Mapping[str, str]
- Parameters related to tuning the model.
- job_
arn str - The ARN of the customization job.
- job_
name str - A name for the customization job.
- job_
status str - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - output_
data_ Customconfig Model Output Data Config Args - S3 location for the output data.
- role_
arn str - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Mapping[str, str]
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Custom
Model Timeouts Args - training_
data_ Customconfig Model Training Data Config Args - Information about the training dataset.
- training_
metrics Sequence[CustomModel Training Metric Args] - Metrics associated with the customization job.
- validation_
data_ Customconfig Model Validation Data Config Args - Information about the validation dataset.
- validation_
metrics Sequence[CustomModel Validation Metric Args] - The loss metric for each validator that you provided.
- vpc_
config CustomModel Vpc Config Args - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
- base
Model StringIdentifier - The Amazon Resource Name (ARN) of the base model.
- custom
Model StringArn - The ARN of the output model.
- custom
Model StringKms Key Id - The custom model is encrypted at rest using this key. Specify the key ARN.
- custom
Model StringName - Name for the custom model.
- customization
Type String - The customization type. Valid values:
FINE_TUNING
,CONTINUED_PRE_TRAINING
. - hyperparameters Map<String>
- Parameters related to tuning the model.
- job
Arn String - The ARN of the customization job.
- job
Name String - A name for the customization job.
- job
Status String - The status of the customization job. A successful job transitions from
InProgress
toCompleted
when the output model is ready to use. - output
Data Property MapConfig - S3 location for the output data.
- role
Arn String - The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.
- Map<String>
- A map of tags to assign to the customization job and custom model. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts Property Map
- training
Data Property MapConfig - Information about the training dataset.
- training
Metrics List<Property Map> - Metrics associated with the customization job.
- validation
Data Property MapConfig - Information about the validation dataset.
- validation
Metrics List<Property Map> - The loss metric for each validator that you provided.
- vpc
Config Property Map - Configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for this job.
Supporting Types
CustomModelOutputDataConfig, CustomModelOutputDataConfigArgs
- S3Uri string
- The S3 URI where the output data is stored.
- S3Uri string
- The S3 URI where the output data is stored.
- s3Uri String
- The S3 URI where the output data is stored.
- s3Uri string
- The S3 URI where the output data is stored.
- s3_
uri str - The S3 URI where the output data is stored.
- s3Uri String
- The S3 URI where the output data is stored.
CustomModelTimeouts, CustomModelTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
CustomModelTrainingDataConfig, CustomModelTrainingDataConfigArgs
- S3Uri string
- The S3 URI where the training data is stored.
- S3Uri string
- The S3 URI where the training data is stored.
- s3Uri String
- The S3 URI where the training data is stored.
- s3Uri string
- The S3 URI where the training data is stored.
- s3_
uri str - The S3 URI where the training data is stored.
- s3Uri String
- The S3 URI where the training data is stored.
CustomModelTrainingMetric, CustomModelTrainingMetricArgs
- Training
Loss double - Loss metric associated with the customization job.
- Training
Loss float64 - Loss metric associated with the customization job.
- training
Loss Double - Loss metric associated with the customization job.
- training
Loss number - Loss metric associated with the customization job.
- training_
loss float - Loss metric associated with the customization job.
- training
Loss Number - Loss metric associated with the customization job.
CustomModelValidationDataConfig, CustomModelValidationDataConfigArgs
- Validators
List<Custom
Model Validation Data Config Validator> - Information about the validators.
- Validators
[]Custom
Model Validation Data Config Validator - Information about the validators.
- validators
List<Custom
Model Validation Data Config Validator> - Information about the validators.
- validators
Custom
Model Validation Data Config Validator[] - Information about the validators.
- validators
Sequence[Custom
Model Validation Data Config Validator] - Information about the validators.
- validators List<Property Map>
- Information about the validators.
CustomModelValidationDataConfigValidator, CustomModelValidationDataConfigValidatorArgs
- S3Uri string
- The S3 URI where the validation data is stored.
- S3Uri string
- The S3 URI where the validation data is stored.
- s3Uri String
- The S3 URI where the validation data is stored.
- s3Uri string
- The S3 URI where the validation data is stored.
- s3_
uri str - The S3 URI where the validation data is stored.
- s3Uri String
- The S3 URI where the validation data is stored.
CustomModelValidationMetric, CustomModelValidationMetricArgs
- Validation
Loss double - The validation loss associated with the validator.
- Validation
Loss float64 - The validation loss associated with the validator.
- validation
Loss Double - The validation loss associated with the validator.
- validation
Loss number - The validation loss associated with the validator.
- validation_
loss float - The validation loss associated with the validator.
- validation
Loss Number - The validation loss associated with the validator.
CustomModelVpcConfig, CustomModelVpcConfigArgs
- Security
Group List<string>Ids - VPC configuration security group IDs.
- Subnet
Ids List<string> - VPC configuration subnets.
- Security
Group []stringIds - VPC configuration security group IDs.
- Subnet
Ids []string - VPC configuration subnets.
- security
Group List<String>Ids - VPC configuration security group IDs.
- subnet
Ids List<String> - VPC configuration subnets.
- security
Group string[]Ids - VPC configuration security group IDs.
- subnet
Ids string[] - VPC configuration subnets.
- security_
group_ Sequence[str]ids - VPC configuration security group IDs.
- subnet_
ids Sequence[str] - VPC configuration subnets.
- security
Group List<String>Ids - VPC configuration security group IDs.
- subnet
Ids List<String> - VPC configuration subnets.
Import
Using pulumi import
, import Bedrock custom model using the job_arn
. For example:
$ pulumi import aws:bedrock/customModel:CustomModel example arn:aws:bedrock:us-west-2:123456789012:model-customization-job/amazon.titan-text-express-v1:0:8k/1y5n57gh5y2e
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.