Inference Profile
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",
},
});Content copied to clipboard
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",
})Content copied to clipboard
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" },
},
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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();
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());
}
}Content copied to clipboard
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: {}Content copied to clipboard
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-12345678Content copied to clipboard
Properties
Link copied to clipboard
The description of the inference profile.
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard