InferenceProfile

class InferenceProfile : KotlinCustomResource

Resource for managing an AWS Bedrock Inference Profile.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getCallerIdentity({});
const example = new aws.bedrock.InferenceProfile("example", {
name: "Claude Sonnet for Project 123",
description: "Profile with tag for cost allocation tracking",
modelSource: {
copyFrom: "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
tags: {
ProjectID: "123",
},
});
import pulumi
import pulumi_aws as aws
current = aws.get_caller_identity()
example = aws.bedrock.InferenceProfile("example",
name="Claude Sonnet for Project 123",
description="Profile with tag for cost allocation tracking",
model_source={
"copy_from": "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
tags={
"ProjectID": "123",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetCallerIdentity.Invoke();
var example = new Aws.Bedrock.InferenceProfile("example", new()
{
Name = "Claude Sonnet for Project 123",
Description = "Profile with tag for cost allocation tracking",
ModelSource = new Aws.Bedrock.Inputs.InferenceProfileModelSourceArgs
{
CopyFrom = "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0",
},
Tags =
{
{ "ProjectID", "123" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
if err != nil {
return err
}
_, err = bedrock.NewInferenceProfile(ctx, "example", &bedrock.InferenceProfileArgs{
Name: pulumi.String("Claude Sonnet for Project 123"),
Description: pulumi.String("Profile with tag for cost allocation tracking"),
ModelSource: &bedrock.InferenceProfileModelSourceArgs{
CopyFrom: pulumi.String("arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0"),
},
Tags: pulumi.StringMap{
"ProjectID": pulumi.String("123"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.bedrock.InferenceProfile;
import com.pulumi.aws.bedrock.InferenceProfileArgs;
import com.pulumi.aws.bedrock.inputs.InferenceProfileModelSourceArgs;
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 current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
.build());
var example = new InferenceProfile("example", InferenceProfileArgs.builder()
.name("Claude Sonnet for Project 123")
.description("Profile with tag for cost allocation tracking")
.modelSource(InferenceProfileModelSourceArgs.builder()
.copyFrom("arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0")
.build())
.tags(Map.of("ProjectID", "123"))
.build());
}
}
resources:
example:
type: aws:bedrock:InferenceProfile
properties:
name: Claude Sonnet for Project 123
description: Profile with tag for cost allocation tracking
modelSource:
copyFrom: arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0
tags:
ProjectID: '123'
variables:
current:
fn::invoke:
function: aws:getCallerIdentity
arguments: {}

Import

Using pulumi import, import Bedrock Inference Profile using the example_id_arg. For example:

$ pulumi import aws:bedrock/inferenceProfile:InferenceProfile example inference_profile-id-12345678

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) of the inference profile.

Link copied to clipboard
val createdAt: Output<String>

The time at which the inference profile was created.

Link copied to clipboard
val description: Output<String>?

The description of the inference profile.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

A list of information about each model in the inference profile. See models.

Link copied to clipboard

The source of the model this inference profile will track metrics and cost for. See model_source. The following arguments are optional:

Link copied to clipboard
val name: Output<String>

The name of the inference profile.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the inference profile. ACTIVE means that the inference profile is available to use.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value mapping of resource tags for the inference profile.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock. APPLICATION means that the inference profile is defined by the user.

Link copied to clipboard
val updatedAt: Output<String>

The time at which the inference profile was last updated.

Link copied to clipboard
val urn: Output<String>