Guide · Amazon Bedrock · Application Inference Profiles
Amazon Bedrock Application Inference Profiles — Cost-Allocation Tags and Per-Team Profiles for MCP Servers
Application inference profiles are user-created Bedrock profiles that inherit a system inference profile's cross-region routing behavior and add custom tags, names, and descriptions for cost visibility in AWS Cost Explorer. When a production MCP server team has multiple services — a code-review agent, a document-summarization tool, a data-enrichment pipeline — all using the same underlying Claude model, the token spend is indistinguishable in Cost Explorer unless each service uses a tagged application inference profile. CreateInferenceProfileCommand creates the profile; the returned ARN is the value you pass as modelId in ConverseCommand. The profile inherits the same multi-region routing as the system profile it was copied from, so there is no behavioral difference — only a cost-reporting difference. The quota is 100 application inference profiles per region per account. This page covers the full CRUD workflow and cost-analysis patterns. For the overview of cross-region routing and system profiles, see Cross-Region Inference Overview and System Inference Profiles. For a complete MCP tool handler using an application profile, see MCP Tool Handler Pattern.
TL;DR
Call CreateInferenceProfileCommand with modelSource.copyFrom pointing to a system profile ID, add tags for cost allocation, and store the returned inferenceProfileArn. Pass that ARN as modelId in ConverseCommand. The IAM resource is the full ARN: arn:aws:bedrock:{region}:{account}:application-inference-profile/{profile-id}. Each profile must have model access enabled in all regions of the underlying system profile. 100 application inference profiles maximum per region per account.
Why application inference profiles exist
System inference profiles solve the cross-region routing problem but provide no cost attribution. When your engineering organization has five teams, each running an MCP server that calls Bedrock, the monthly Bedrock invoice shows a single line item for all Claude usage combined. You cannot determine which MCP server drove the cost spike without custom application-layer logging and metering.
Application inference profiles solve this by acting as a passthrough with metadata. You create one profile per logical unit (team, service, environment, feature), tag each profile with the metadata that matters for your organization (cost center, service name, environment, Jira project key), and use each profile's ARN in the corresponding service's configuration. AWS applies those tags to the Bedrock invocation records in Cost and Usage Report, making the spend visible in Cost Explorer grouped by tag.
Secondary benefits:
- Stable naming. An application profile named
mcp-server-claude-prodcan survive a model version upgrade (delete and recreate pointing at the new system profile) without changing the reference in your ECS task definition or Lambda environment variable. - IAM scoping per service. You can write IAM policies that grant each MCP server task role access only to its own application profile ARN, preventing one service from accidentally invoking on another service's billing line.
- Environment separation. Create
mcp-server-claude-devandmcp-server-claude-prodas separate profiles. When both appear in Cost Explorer filtered by theenvironmenttag, you can verify that dev usage is not dwarfing prod spend — a common mistake when load-testing a dev environment runs thousands of LLM calls against the same AWS account as production.
Creating an application inference profile
import {
BedrockClient,
CreateInferenceProfileCommand,
GetInferenceProfileCommand,
ListInferenceProfilesCommand,
DeleteInferenceProfileCommand,
TagResourceCommand,
ListTagsForResourceCommand,
} from "@aws-sdk/client-bedrock";
const bedrockClient = new BedrockClient({ region: "us-east-1" });
async function createMcpServerProfile(options: {
name: string; // e.g. "mcp-server-claude-prod"
systemProfileId: string; // e.g. "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
environment: string; // "production" | "staging" | "dev"
service: string; // "code-review-agent" | "data-enrichment" | ...
costCenter: string; // "platform-team" | "product-engineering" | ...
}) {
const response = await bedrockClient.send(new CreateInferenceProfileCommand({
inferenceProfileName: options.name,
description: `Bedrock profile for ${options.service} in ${options.environment}`,
modelSource: {
copyFrom: options.systemProfileId,
// copyFrom accepts a system profile ID or ARN; using the short ID is clearer
},
tags: [
{ key: "environment", value: options.environment },
{ key: "service", value: options.service },
{ key: "cost-center", value: options.costCenter },
{ key: "managed-by", value: "mcp-server-platform" },
],
}));
console.log("Created profile ARN:", response.inferenceProfileArn);
// "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/mcp-server-claude-prod"
console.log("Status:", response.inferenceProfileStatus);
// "ACTIVE" — profiles are immediately usable after creation
return response.inferenceProfileArn!;
}
Key details about CreateInferenceProfileCommand:
inferenceProfileNamemust be unique within the region. Attempting to create two profiles with the same name returnsConflictException. Use a naming convention like{service}-{model-short-name}-{environment}.modelSource.copyFromtakes a system profile ID, not a foundation model ID. Passing a plain model ID (without the geographic prefix) returnsValidationException. The correct value is the system profile ID fromListInferenceProfilesCommand, e.g.,us.anthropic.claude-3-5-sonnet-20241022-v2:0.- The returned profile is immediately ACTIVE. No async polling is required. The profile is usable as soon as
CreateInferenceProfileCommandreturns. - Tags on the profile propagate to Cost and Usage Report line items. Tags are not applied retroactively — only invocations made after profile creation carry the tags.
Using an application profile in ConverseCommand
Pass the full profile ARN as modelId. All other ConverseCommand parameters are identical to using a system profile ID or a foundation model ID:
import { BedrockRuntimeClient, ConverseCommand, ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime";
const runtimeClient = new BedrockRuntimeClient({ region: "us-east-1" });
// Store the application profile ARN in an environment variable at deploy time
const BEDROCK_PROFILE_ARN = process.env.BEDROCK_PROFILE_ARN!;
// e.g. "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/mcp-server-claude-prod"
export async function invokeWithApplicationProfile(
systemPrompt: string,
userMessage: string
) {
const response = await runtimeClient.send(new ConverseCommand({
modelId: BEDROCK_PROFILE_ARN, // ← full ARN, not just the name
system: [{ text: systemPrompt }],
messages: [{ role: "user", content: [{ text: userMessage }] }],
inferenceConfig: { maxTokens: 2048, temperature: 0.0 },
}));
return response.output?.message?.content?.[0]?.text ?? "";
}
// Streaming works identically
export async function* streamWithApplicationProfile(
systemPrompt: string,
userMessage: string
) {
const response = await runtimeClient.send(new ConverseStreamCommand({
modelId: BEDROCK_PROFILE_ARN,
system: [{ text: systemPrompt }],
messages: [{ role: "user", content: [{ text: userMessage }] }],
inferenceConfig: { maxTokens: 2048 },
}));
for await (const event of response.stream ?? []) {
if (event.contentBlockDelta?.delta?.text) {
yield event.contentBlockDelta.delta.text;
}
}
}
Important: Do not construct the profile ARN dynamically in your MCP server handler code. Store it as an environment variable at deploy time (ECS task definition environment, Lambda environment variable, or Kubernetes secret). This makes it easy to change the profile without redeploying code and avoids a GetInferenceProfileCommand lookup on every tool call.
IAM policy for application inference profiles
Application profile ARNs include your account ID, unlike system profile ARNs. The policy structure is:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockApplicationProfileInvoke",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/mcp-server-claude-prod"
]
},
{
"Sid": "BedrockProfileDescribe",
"Effect": "Allow",
"Action": [
"bedrock:GetInferenceProfile",
"bedrock:ListInferenceProfiles"
],
"Resource": "*"
}
]
}
The bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions apply to the application profile ARN — not to the underlying foundation model ARN. If your ECS task role has bedrock:InvokeModel on arn:aws:bedrock:us-east-1::foundation-model/us.anthropic.claude-... but NOT on the application profile ARN, invocations via the application profile will return AccessDeniedException.
Use IAM conditions to scope each service to only its own profile:
{
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": "arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/service": "code-review-agent"
}
}
}
This prevents the code-review agent's task role from invoking on the data-enrichment pipeline's profile, even if the ARN format is known.
Managing profile lifecycle
// List all application profiles in the current region
async function listApplicationProfiles() {
const profiles = [];
let nextToken: string | undefined;
do {
const resp = await bedrockClient.send(new ListInferenceProfilesCommand({
typeEquals: "APPLICATION",
maxResults: 100,
nextToken,
}));
profiles.push(...(resp.inferenceProfileSummaries ?? []));
nextToken = resp.nextToken;
} while (nextToken);
return profiles;
}
// Get one profile by ARN or name
async function getProfile(identifer: string) {
return bedrockClient.send(new GetInferenceProfileCommand({
inferenceProfileIdentifier: identifer,
// Accepts full ARN or inferenceProfileId (the name)
}));
}
// Add or update tags on an existing profile
async function updateProfileTags(profileArn: string, tags: Array<{key: string; value: string}>) {
await bedrockClient.send(new TagResourceCommand({
resourceARN: profileArn,
tags,
}));
}
// Delete a profile (does not affect the underlying system profile or model access)
async function deleteProfile(profileArn: string) {
await bedrockClient.send(new DeleteInferenceProfileCommand({
inferenceProfileIdentifier: profileArn,
}));
}
Notes on deletion:
- Deleting an application profile does not affect model access, the underlying system profile, or any existing IAM policies that reference the ARN (those policies become inert — the resource no longer exists).
- After deletion,
GetInferenceProfileCommandon the ARN returnsResourceNotFoundException. Any MCP server invocations using the deleted ARN immediately fail withResourceNotFoundException. Plan a gradual migration: create the new profile, update the environment variable, redeploy, then delete the old profile. - Profile names are reusable after deletion — a new profile can be created with the same name.
Cost allocation in Cost Explorer
To see Bedrock token spend broken down by application inference profile tag, activate the tags as cost allocation tags in AWS Billing:
- Go to AWS Billing and Cost Management → Cost allocation tags.
- Select the tags you used on inference profiles (
service,environment,cost-center). - Choose Activate. Tag activation takes up to 24 hours to reflect in Cost Explorer.
Once active, open Cost Explorer, choose Service: Bedrock, and group by your tag key to see token spend per MCP service. The granularity is daily; hourly granularity is available via Cost and Usage Report (CUR) with S3 delivery.
Important limitation: Tags on application profiles propagate to CUR line items for invocations made through that profile. Invocations using the system profile ID directly (without an application profile wrapper) carry no custom tags and appear as untagged Bedrock spend in Cost Explorer. If you are migrating an existing MCP server from system profiles to application profiles, there will be a gap period in cost attribution during the transition.
Application profiles and model version upgrades
When Anthropic releases a new Claude version and you want to upgrade, the upgrade path with application profiles is:
- Identify the new system profile ID:
us.anthropic.claude-sonnet-4-6-20251101-v1:0 - Enable model access in all three US regions for the new model.
- Create a new application profile copying from the new system profile ID, with the same tags as the old profile.
- Update the
BEDROCK_PROFILE_ARNenvironment variable in your ECS task definition or Lambda to the new profile ARN. - Deploy. Verify that invocations are routing through the new profile (check CloudWatch Bedrock metrics).
- Delete the old application profile after a few days of stable operation.
This upgrade path keeps a stable custom name convention — both old and new profiles can be named identically if you delete the old one first. If you need to run both models simultaneously (canary traffic split), create both profiles at the same time, and route a fraction of tool calls to the new profile ARN using an environment variable toggle or feature flag.
Quota: 100 application profiles per region
AWS limits each account to 100 application inference profiles per region. For most MCP server deployments this is sufficient (one profile per service per environment = perhaps 20–40 profiles at scale). If you approach the limit:
- Consolidate dev/test profiles that are rarely used — create on-demand and delete after use.
- Reuse profiles across related services when per-service cost attribution is not required.
- File a Service Quotas increase request for Amazon Bedrock — Application inference profiles per region.
The quota increase request is typically granted quickly for accounts with active Bedrock usage.
Related pages in this arc
- Cross-Region Inference Overview — routing mechanics, model access per-region gotcha, latency tradeoffs
- System Inference Profiles — ListInferenceProfilesCommand, available model IDs, IAM ARN format
- MCP Tool Handler Pattern — full TypeScript handler with ThrottlingException retry using application profile ARN
For cost management across your full AWS stack, see AWS Cost Observability for MCP Server Teams. For IAM policies for Bedrock in general, see Bedrock Model Invocation.