Amazon Bedrock
Invoke foundation models on AWS Bedrock including Claude, Llama, and Titan.
On this page
Connect
Auth type: Credentials form (custom_auth). Pass the fields the provider needs (listed below) as the connection's credentials. They are sealed at rest.
| Field | Type | Description |
|---|---|---|
accessKeyIdrequired | text | Your AWS access key ID |
secretAccessKeyrequired | secret | Your AWS secret access key |
regionrequired | text | AWS region (e.g. us-east-1) |
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("amazon_bedrock", action, input) resolves with the provider's answer and rejects when Amazon Bedrock isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "amazon_bedrock"} says whether yours can call it.
// workflows/notify.ts: call Amazon Bedrock when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellAmazonBedrock = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Amazon Bedrock isn't connected.
const output = await step.run("Amazon Bedrock", () =>
step.ctx.integrations.invoke("amazon_bedrock", "generate_content_from_image", {
"model": "<model>",
"image": "<image>",
"prompt": "<prompt>"
}),
);
step.ctx.log("Amazon Bedrock answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "amazon_bedrock",
"piece_action": "generate_content_from_image",
"input": {
"model": "<model>",
"image": "<image>",
"prompt": "<prompt>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/amazon_bedrock/generate_content_from_image" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"model":"<model>","image":"<image>","prompt":"<prompt>"}}'Actions
generate_content_from_image
Generate Content from Image. Ask a Bedrock model a question about an image.
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The foundation model to use. Must support image input. |
imagerequired | file | The image to analyze (PNG, JPEG, GIF, or WebP). |
promptrequired | long text | What do you want the model to tell you about the image? |
systemPromptoptional | long text | Instructions that guide the model behavior. |
temperatureoptional | number | Controls randomness. Lower values produce more deterministic output. |
maxTokensoptional | number | The maximum number of tokens to generate. |
generate_embeddings
Generate Embeddings. Generate vector embeddings from text using Amazon Titan Embed, Cohere Embed, or Amazon Nova Multimodal Embeddings models.
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The embedding model to use. |
inputTextrequired | long text | The text to generate embeddings for. |
embeddingPurposeoptional | one of "GENERIC_INDEX" | "GENERIC_RETRIEVAL" | "TEXT_RETRIEVAL" | "CLASSIFICATION" | "CLUSTERING" | Optimize embeddings for your use case. Only used by Nova Multimodal Embeddings. |
dimensionsoptional | number | The number of dimensions for the output embedding vector. Titan Embed v2: 256, 512, 1024. Nova Multimodal: 256, 384, 1024, 3072. |
normalizeoptional | boolean | Whether to normalize the output embedding vector. Supported by Titan Embed v2. |
generate_image
Generate Image. Generate an image from a text prompt using Amazon Titan Image Generator or Stability AI models.
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The image generation model to use. |
promptrequired | long text | A text description of the image you want to generate. |
negativePromptoptional | long text | Describe what you do NOT want in the image. Helps refine the output. |
widthoptional | number | Image width in pixels. Must be supported by the model. |
heightoptional | number | Image height in pixels. Must be supported by the model. |
seedoptional | number | A seed for reproducible results. Use the same seed and prompt to get the same image. |
send_prompt
Ask Bedrock. Send a text prompt to an Amazon Bedrock model.
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The foundation model to use for generation. |
promptrequired | long text | Prompt |
systemPromptoptional | long text | Instructions that guide the model behavior. |
temperatureoptional | number | Controls randomness. Lower values produce more deterministic output. |
maxTokensoptional | number | The maximum number of tokens to generate. |
topPoptional | number | Nucleus sampling: the model considers tokens with top_p probability mass. |
stopSequencesoptional | array | Sequences that will cause the model to stop generating. Up to 4 sequences. |
memoryKeyoptional | text | A memory key that will keep the chat history shared across runs and flows. Keep it empty to leave the model without memory of previous messages. |
custom_api_call
Custom API Call. Make a custom API call to any AWS Bedrock endpoint. Requests are automatically signed with AWS Signature V4.
| Input | Type | Description |
|---|---|---|
servicerequired | one of "bedrock" | "bedrock-runtime" | "bedrock-agent" | "bedrock-agent-runtime" | Select the AWS Bedrock service endpoint to call. Use "Bedrock" for control plane operations (e.g., ListFoundationModels) and "Bedrock Runtime" for inference operations (e.g., InvokeModel). |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
pathrequired | text | The API path (e.g., /foundation-models, /model/{modelId}/invoke). See the AWS Bedrock API Reference for available endpoints. |
headersoptional | object | Additional headers to include. Authorization headers are automatically added via AWS Signature V4. |
queryParamsoptional | object | Query parameters to include in the request URL. |
bodyoptional | JSON | JSON body for POST/PUT requests. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
Details
- Id
amazon_bedrock- Category
- AI and ML
- Tags
- ai, aws, bedrock, llm, enterprise
- Package
@activepieces/piece-amazon-bedrock@0.0.4- Runs
- Through the integration runner