AWS Bedrock
Last updated
Was this helpful?
Last updated
Was this helpful?
Portkey provides a robust and secure gateway to facilitate the integration of various Large Language Models (LLMs) into your applications, including models hosted on AWS Bedrock.
With Portkey, you can take advantage of features like fast AI gateway access, observability, prompt management, and more, all while ensuring the secure management of your LLM API keys through a system.
Portkey provides a consistent API to interact with models from various providers. To integrate Bedrock with Portkey:
Add the Portkey SDK to your application to interact with Anthropic's API through Portkey's gateway.
To integrate AWS Bedrock with Portkey, you need the AWS Secret Access Key
, AWS Access Key Id
, and AWS Region
with which you can create your Virtual key on Portkey.
.
Use the Portkey instance to send requests to Anthropic. You can also override the virtual key directly in the API call if needed.
Portkey's multimodal Gateway fully supports Bedrock's vision models anthropic.claude-3-sonnet
, anthropic.claude-3-haiku
, and anthropic.claude-3-opus
For more info, check out this guide:
Once you're ready with your prompt, you can use the portkey.prompts.completions.create
interface to use the prompt in your application.
If you do not want to add your AWS details to Portkey vault, you can also directly pass them while instantiating the Portkey client.
awsAccessKeyId
aws_access_key_id
x-portkey-aws-session-token
awsSecretAccessKey
aws_secret_access_key
x-portkey-aws-secret-access-key
awsRegion
aws_region
x-portkey-aws-region
awsSessionToken
aws_session_token
x-portkey-aws-session-token
In the console, you'll find the 'Access keys' section. Click on 'Create access key'.
Copy the Secret Access Key
once it is generated, and you can view the Access Key ID
along with it.
The complete list of features supported in the SDK are available on the link below.
You'll find more information in the relevant sections:
If you're using , you can pass your aws_session_token
along with the Virtual key:
You can manage all prompts to AWS bedrock in the . All the current models of Anthropic are supported and you can easily start testing different prompts.
to obtain your AWS Access Key ID and AWS Secret Access Key.
On the same under the 'Access keys' section, where you created your Secret Access key, you will also find your Access Key ID.
And lastly, get Your AWS Region
from the Home Page of as shown in the image below.