Amazon Bedrock
Invoke foundation models on AWS Bedrock including Claude, Llama, and Titan.
On this page
Connect
Auth type: Credentials form (custom_auth). Fill in the fields the provider needs (listed below). They are stored encrypted in the vault.
| 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) |
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("amazon_bedrock", "generate_content_from_image", {
"model": "<model>",
"image": "<image>",
"prompt": "<prompt>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Amazon Bedrock answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "amazon-bedrock-generate-content-from-image",
name: "Amazon Bedrock: Generate Content from Image",
description: "Calls Amazon Bedrock when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("amazon_bedrock", {
"action": "generate_content_from_image",
"model": "<model>",
"image": "<image>",
"prompt": "<prompt>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_imagein catalog
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_embeddingsin catalog
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_imagein catalog
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_promptin catalog
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- Tier
- Built in