PATTERN Cited by 1 source
Tagged inference-profile cost attribution¶
Intent¶
Attribute use of a shared foundation model to organizational owners without creating a distinct AWS caller identity for every owner. The application resolves an authenticated request to a trusted cost boundary, then invokes a tagged application inference profile that points to the common model.
Structure¶
authenticated request
│
▼
trusted owner / department resolution
│ validate against known mapping
▼
owner → tagged inference-profile ARN
│
▼
shared IAM role invokes Bedrock + underlying model
│
▼
Cost Explorer groups billed usage by activated profile tag
Three elements are required:
- Trusted ownership resolver — claims, directory lookup, or a server-side session field identifies the department. Never accept an arbitrary client-supplied tag or ARN.
- Allowlisted routing map — maps the known boundary to a known profile ARN and rejects unknown values.
- Billing-plane tag activation — profile tags must be activated at the payer level before Cost Explorer can group costs by them.
Why this is distinct from caller-identity attribution¶
Per-caller billing works when every team invokes Bedrock under its own IAM principal. It fails when a shared application role is intentionally the only AWS principal. This pattern preserves that operational model while making the selected Bedrock resource, rather than the caller, the attribution carrier. It is a Bedrock-specific realization of patterns/chargeback-cost-attribution and a sibling of patterns/eks-cost-allocation-tags, which derives billing dimensions from Kubernetes runtime metadata instead.
Operational rules¶
- Give the application permission on both the profile and underlying-model ARNs.
- Treat the profile ARN as versioned application configuration; profile deletion or recreation changes the identifier.
- Use CloudFormation when the profile population is large or managed centrally.
- Keep near-real-time token telemetry separately: Cost Explorer may take 24–48 hours to show newly activated tags.
- Add budget, anomaly, quota, or model-allowlist controls separately; resource attribution alone is observability, not enforcement.
Trade-offs¶
| Advantage | Trade-off |
|---|---|
| Shared application credentials remain simple | Application becomes responsible for correct boundary resolution |
| One foundation model serves many owners | Billing tag does not isolate prompts, data, or model access |
| Cost Explorer provides an AWS-wide financial view | Reporting is delayed and therefore not a per-request guardrail |
| Wildcard profile policy makes onboarding easy | It broadens the role's ability to invoke profiles |
Failure modes¶
- Client-controlled department selection — users can shift their spend to another team; resolve ownership server-side.
- Unknown-boundary fallback to raw model ID — traffic becomes untagged; reject rather than silently bypass the profile.
- Inactive or inconsistently cased tag — no expected Cost Explorer breakdown appears.
- Profile lifecycle drift — a recreated profile has a new ARN and causes invocation failures until the map is redeployed.
- Treating delayed bills as a budget limit — cost spikes remain unbounded for the reporting delay; pair with runtime telemetry and quota enforcement.
Seen in¶
- sources/2026-08-13-aws-track-generative-ai-costs-with-amazon-bedrock-inference-profiles — AWS's HR, Accounting, and IT example: department-specific tagged profiles route to one foundation model under one IAM role, then Cost Explorer groups spend by
Team.
Related¶
- systems/amazon-bedrock-application-inference-profiles — the Bedrock resource used as the routing target.
- concepts/cost-tracking-per-team — the platform-governance requirement.
- patterns/chargeback-cost-attribution — broader accountability-loop pattern.
- patterns/eks-cost-allocation-tags — billing-native tagging sibling.