- Test your data with different foundation models
- Perform A/B testing with different foundation models
- Perform batch inference with different foundation models
Portkey supports two modes on Bedrock:
- Provider Batch API (cheapest, completion_window:
24h
,48h
, etc.) - Portkey Batch API ⭐️ (fast, provider-agnostic, completion_window:
immediate
)
Before You Start
- Portkey API key (
$PORTKEY_API_KEY
). - Bedrock credentials — either a Portkey Virtual Key or explicit AWS keys (
aws_access_key_id
,aws_secret_access_key
,aws_region
, optionalaws_session_token
). - S3 bucket with read/write access for inputs and outputs.
- IAM roles (see Permissions & IAM below).
- Optional: a Portkey File (
input_file_id
) — required only when you setcompletion_window:"immediate"
(Portkey-Batch mode).
Using Bedrock Batch API through Portkey
Create Batch Job
List Batch Jobs
Get Batch Job Details
Get Batch Output
List Batch Jobs
Cancel Batch Job
Information about Permissions and IAM Roles
For Principal Role (Used in Virtual Key)
For Principal Role (Used in Virtual Key)
These are the minimum permissions required to use the Bedrock Batch APIs.
For Service Role (role_arn) used for creating and executing the batch job
For Service Role (role_arn) used for creating and executing the batch job
These are the minimum permissions required to use the Bedrock Batch APIs.Trust relationship:Permission Policy:
Defaults & Limits (Bedrock Native)
Property | Default | Notes |
---|---|---|
completion_window | 24h | Fixed by Bedrock. |
Job quota | 50k/day | Subject to your AWS account. |
Max input file size | 10 GB | Across all .jsonl objects. |
Glossary
Term | Meaning |
---|---|
Batch Job | Collection of asynchronous completions. |
Portkey File (input_file_id ) | File uploaded to Portkey and re-uploaded to the provider for batch processing. |
Virtual Key | Bedrock credential stored in Portkey; referenced by ID, not secret. |
Completion Window | immediate → Portkey-Batch; 24h → Bedrock native. |