Skip to content

Commit 4fa00a4

Browse files
committed
feat(docs): add cost attribution guide with Bedrock Application Inference Profiles
1 parent 8653a3f commit 4fa00a4

3 files changed

Lines changed: 67 additions & 1 deletion

File tree

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The web interface allows real-time configuration updates without stack redeploym
1919
- **Extraction Attributes**: Configure fields to extract for each document class (defined as JSON Schema properties)
2020
- **Few Shot Examples**: Upload and configure example documents to improve accuracy (supported in Pattern 2)
2121
- **Model Selection**: Choose between available Bedrock models for classification and extraction
22+
> **💡 Cost Attribution Tip:** You can replace standard model IDs with [Bedrock Application Inference Profile](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html) ARNs to enable cost-allocation tagging (e.g., for MAP migration tracking). This is a configuration-only change — no code modifications required. See [Cost Attribution with Application Inference Profiles](./cost-calculator.md#cost-attribution-with-bedrock-application-inference-profiles) for step-by-step instructions.
2223
- **Prompt Engineering**: Customize system and task prompts for optimal results
2324
- **OCR Features**: Configure Textract features (TABLES, FORMS, SIGNATURES, LAYOUT) for enhanced data capture
2425
- **Evaluation Methods**: Set evaluation methods and thresholds for each attribute

docs/cost-calculator.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,71 @@ In addition to the built-in cost tracking, consider using these AWS tools:
100100
- **AWS Budgets**: Set custom budgets and receive alerts when costs exceed thresholds
101101
- **AWS Cost and Usage Reports**: Generate detailed reports on your AWS costs and usage
102102

103+
## Cost Attribution with Bedrock Application Inference Profiles
104+
105+
Amazon Bedrock [Application Inference Profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html) let you tag Bedrock model invocations with custom cost-allocation tags (e.g., project, team, or migration program identifiers). Because all Bedrock calls in the GenAI IDP Accelerator are driven by model IDs in the configuration, you can enable cost attribution **without any code changes** — just create an inference profile and update the configuration.
106+
107+
### Why Use Application Inference Profiles?
108+
109+
By default, Bedrock usage appears in AWS Cost Explorer as a single line item per model. Application inference profiles enable you to:
110+
111+
- **Attribute Bedrock costs** to specific projects, teams, or migration programs using AWS cost-allocation tags
112+
- **Track costs per workload** when multiple applications share the same AWS account
113+
- **Support MAP (Migration Acceleration Program) tagging** — e.g., `map-migrated: migDNDBZMXMLZ`
114+
- **Separate cost reporting** across different IDP document processing pipelines
115+
116+
### Step-by-Step Setup
117+
118+
#### Step 1 — Create an Application Inference Profile in the Bedrock Console
119+
120+
1. Open the **Amazon Bedrock Console****Inference****Inference profiles**
121+
2. Click **Create inference profile**
122+
3. Select the **foundation model** currently used in your IDP configuration (e.g., `us.anthropic.claude-3-7-sonnet-20250219-v1:0`)
123+
4. Add your cost-allocation tags. For example:
124+
- `map-migrated`: `migDNDBZMXMLZ`
125+
- `project`: `my-idp-workload`
126+
5. Note the **Application Inference Profile ARN** after creation — it will look like:
127+
```
128+
arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abcdef123456
129+
```
130+
131+
> **💡 Tip:** Create separate inference profiles for each processing stage (classification, extraction, assessment) if you need per-stage cost breakdowns.
132+
133+
#### Step 2 — Update the IDP Configuration (No Code Change Needed)
134+
135+
1. In the IDP web UI, go to **View/Edit Configuration**
136+
2. Toggle to **JSON View** or **YAML View**
137+
3. Find the `model` or `model_id` fields in the relevant processing step sections — for example:
138+
- **Classification**: `classification.model_id`
139+
- **Extraction**: `extraction.model_id`
140+
- **Assessment**: `assessment.model`
141+
- **Summarization**: `summarization.model`
142+
4. **Replace** the standard model ID or cross-region inference profile ID with the new **Application Inference Profile ARN**
143+
144+
**Before:**
145+
```yaml
146+
model_id: us.anthropic.claude-3-7-sonnet-20250219-v1:0
147+
```
148+
149+
**After:**
150+
```yaml
151+
model_id: arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abcdef123456
152+
```
153+
154+
5. Click **Save Changes**
155+
156+
> **⚠️ Note:** Application inference profiles are region-specific. If you are using cross-region inference profiles (e.g., `us.*` or `eu.*` prefixes) for multi-region routing, be aware that an application inference profile pins invocations to the region where it was created. See the [EU Region Model Support](./eu-region-model-support.md) doc for details on cross-region behavior.
157+
158+
### Verifying Cost Attribution
159+
160+
After processing documents with the updated configuration:
161+
162+
1. Go to **AWS Cost Explorer**
163+
2. Group by your cost-allocation tag (e.g., `map-migrated`)
164+
3. Bedrock invocations made through the application inference profile will now appear under the tagged allocation
165+
166+
> **📝 Note:** Cost allocation tags may take up to 24 hours to appear in Cost Explorer after first use. You must also [activate the tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/activating-tags.html) in the Billing console if they are user-defined tags.
167+
103168
## Disclaimer
104169

105170
The GenAI IDP Accelerator solution is designed to provide cost transparency and efficiency. However, actual costs will depend on your specific implementation, document characteristics, and processing needs. Always refer to the official AWS pricing pages for the most current pricing information for all services used.

docs/well-architected.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The GenAI Intelligent Document Processing (GenAIIDP) Accelerator demonstrates st
118118

119119
### Recommendations
120120

121-
- Implement more granular cost allocation tags to track expenses by document type, workflow, or customer.
121+
- Implement more granular cost allocation tags to track expenses by document type, workflow, or customer. Bedrock [Application Inference Profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-create.html) can be used to tag model invocations for cost attribution — see [Cost Attribution with Application Inference Profiles](./cost-calculator.md#cost-attribution-with-bedrock-application-inference-profiles).
122122
- Add cost anomaly detection to identify unexpected usage patterns.
123123
- Consider implementing tiered storage strategies for processed documents based on access patterns.
124124
- Evaluate model selection based on cost-performance tradeoffs for different document types.

0 commit comments

Comments
 (0)