Amazon Bedrock API Reference Sheet
-
Amazon Bedrock API Reference is the master specification for the Amazon Bedrock service. It encompasses protocols, authentication methods, endpoints, common parameters, and error-handling standards used across the entire Bedrock ecosystem (both the Control Plane and the Data Plane).
Amazon Bedrock API Reference Common Parameters
- Action: (String) Specifies the particular API action to be performed.
- Version: (String) Indicates the API version used for the request, formatted as
YYYY-MM-DD. - X-Amz-Algorithm: (String) The hash algorithm used to sign the request (e.g.,
AWS4-HMAC-SHA256). Required when authenticating via query string. - X-Amz-Credential: (String) The credential scope string containing the access key, date, region, and service. Required when authenticating via query string.
- X-Amz-Date: (String) The timestamp used to create the signature, in ISO 8601 basic format (
YYYYMMDD'T'HHMMSS'Z'). If present, this overrides the standardDateheader. - X-Amz-Security-Token: (String) The temporary session token obtained from AWS STS. Required only when using temporary security credentials.
- X-Amz-Signature: (String) The hex-encoded signature calculated from the request details and signing key. Required when authenticating via query string.
- X-Amz-SignedHeaders: (String) A list of all HTTP headers included in the canonical request signature calculation. Required when authenticating via query string.
Amazon Bedrock API Reference Common Errors
| Error Code | HTTP Status Code | Description |
|
400 | You do not have sufficient permissions or access rights to perform the requested action. |
|
400 | The provided request signature does not match the required AWS standards or is missing components. |
|
500 | The request failed processing due to an unknown server-side exception or error. |
|
400 | The requested operation or action is invalid, malformed, or mistyped. |
InvalidClientTokenId |
403 | The AWS Access Key ID or X.509 certificate provided in the request was not found in AWS records. |
|
400 | You lack the necessary permissions required to execute this specific action. |
|
403 | The AWS Access Key ID used requires an active subscription to the service before proceeding. |
|
400 | The request timestamp is more than 15 minutes old (or more than 15 minutes in the future) relative to the server time. |
|
|
503 | The request failed because the server is currently experiencing a temporary failure or overload. |
|
400 | The request was denied because the call rate exceeded the allowed throttling limits. |
ValidationError |
400 | The input parameters fail to satisfy the specific constraints or schema required by the service. |
API Endpoint Structure
Amazon Bedrock API endpoints use a regional naming convention, ensuring model and resource operations are routed to the appropriate AWS Region.
- Format:
bedrock-runtime.{region}.amazonaws.com- Example (US East 1):
https://bedrock-runtime.us-east-1.amazonaws.com
- Private Access:
- You can access these APIs privately from your VPC by using AWS PrivateLink (Interface VPC Endpoints), which avoids traversing the public internet and enhances security and compliance.
Best Practices
- Use SDKs:
- Always use AWS SDKs (such as Boto3, AWS SDK for JavaScript, or AWS SDK for Java) instead of direct HTTP calls. SDKs handle SigV4 signing, retries, error parsing, and other operational details automatically.
- Handle Throttling:
- Implement a retry logic with exponential backoff in your application to handle
ThrottlingExceptionand similar errors gracefully, especially during periods of high load.
- Implement a retry logic with exponential backoff in your application to handle
- Check Quotas:
- Before launching production workloads, verify your Amazon Bedrock service quotas (Provisioned Throughput or On-Demand) to ensure your application can handle expected traffic and avoid service interruptions.
References:
https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html
https://docs.aws.amazon.com/bedrock/latest/APIReference/CommonParameters.html
https://docs.aws.amazon.com/bedrock/latest/APIReference/CommonErrors.html











