> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engini.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock

Let's learn how to connect Engini to AWS Bedrock.

This integration lets you run foundation models on Amazon Bedrock from your workflows: chat with a model, create text embeddings and images, check text against a guardrail, and look up the models available to you.

To get started, create an account at [AWS](https://aws.amazon.com/).

## Add a Connection to AWS Bedrock in Engini

### Prerequisites

* An AWS account with access to Amazon Bedrock.
* A Bedrock API key from AWS.
* The AWS Region where you use Bedrock, for example `eu-west-1`.

  **Note:** The key must be allowed to use the models you want to call. Models and inference profiles are listed for the Region you enter in the connection.

### Retrieve your AWS Bedrock API Key

1. Sign in to the [AWS Console](https://console.aws.amazon.com/) and open Amazon Bedrock.
2. Select API keys in the left menu.
3. Generate a new API key and copy it.

### Connecting Engini to AWS Bedrock

1. Enter your Engini account at [https://app.engini.io](https://app.engini.io/).

2. Navigate to the Connections page by clicking on Connections in the left sidebar or by clicking [here](https://app.engini.io/connections).

   ![Engini - Connections page](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/connections-page.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=ccd068961689b10d8bb64d7e6cd8599a)

3. Click on the "New Integration" option located at the top bar.

   ![Engini - New Integration button](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/new-integration-button.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=11845712f38a4943bcc7ce47163b930d)

4. Choose the AWS Bedrock option from the available applications.

   ![AWS Bedrock - Choose Application](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-choose-application.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=5e24c30d23c04c06ee8434e92c3343ea)

5. Enter the following details in the "New Integration" form and press Save:

   ![AWS Bedrock - New Integration form](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-new-integration.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=65ec629e1e74516a5236758cbe8541eb)

   <ol>
     <li>*Connection Name -* Enter a name that helps identify the AWS Bedrock connection.</li>
     <li>*Bedrock API Key -* Enter the Bedrock API key you created in AWS. The key is stored as a secret and is sent with every request to Bedrock.</li>
     <li>*AWS Region -* Enter the AWS Region you work in, for example eu-west-1. Engini sends your requests to Bedrock in this Region, and the model lists show what is available there.</li>
     <li>*Save -* Click Save to create the connection.</li>
   </ol>

## Use AWS Bedrock as an AI Model

### Chat Model

AWS Bedrock chat models can power the [AI Agent](https://docs.engini.ai/help/ai/ai-agent.md). In the AI Agent step, add an AI model, choose your AWS Bedrock connection, and set the following field.

![AWS Bedrock - Chat Model in the AI Model panel](https://mintcdn.com/engini/iyCKHPOrwHHLm0kU/help/assets/apps/aws-bedrock/aws-bedrock-chat-model.png?fit=max\&auto=format\&n=iyCKHPOrwHHLm0kU\&q=85\&s=ec11462e32d3e552aa1df4e3c0cda3e5)

* *Model -* Choose the Bedrock model or inference profile the agent will use, or enter its Id, for example `anthropic.claude-sonnet-4-6`. The list shows the models and inference profiles available in your connection's Region.

Click Add Field to add and populate additional fields for the model, such as Temperature (0 to 1), Top P (0 to 1) and Max Tokens (the longest reply, in tokens). If you leave them blank, the model's own defaults are used.

AWS Bedrock also works as the embedding provider for Engini Knowledge. When you create a Knowledge base, choose your AWS Bedrock connection as the AI Connection and select Titan Text Embeddings V2.

## Actions

### Apply Guardrail

Checks a piece of text against a guardrail you created in Amazon Bedrock, and tells you whether the guardrail would step in.

![AWS Bedrock - Apply Guardrail action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-apply-guardrail.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=54bb9491ae318c1e973758d513417076)

1. *Guardrail Id -* The Id or the full ARN of your guardrail, for example `a1b2c3d4e5f6`. You can find it in the Amazon Bedrock console under Guardrails.
2. *Guardrail Version -* The version of the guardrail to use: a number such as `1`, or `DRAFT` for the working draft.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

**Notes:**

* Source and Content are required and are added through Add Field. In Source, choose Input (user prompt) to check what a user sends to a model, or Output (model reply) to check what a model answers. In Content, add the text to check in its Text field.
* Output Scope is optional and sets how much detail is returned: Interventions only or Full details.
* The result tells you whether the guardrail stepped in, so you can use it in a later Condition step.

### Count Tokens

Counts how many tokens a conversation would use with a model, without running the model. Use it to estimate size and cost before you send a request.

![AWS Bedrock - Count Tokens action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-count-tokens.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=27dfcc5525d9836fcf5841a33a13ada5)

1. *Model -* The model to count tokens for. Enter its Id, choose it from the list, or map the Id from a previous step.
2. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

**Notes:**

* Messages is required and is added through Add Field. It has the same structure as in Create Chat Completion. System Prompts is optional.
* Count Tokens works only with models that AWS lets you count tokens for, entered by their plain model Id, for example `anthropic.claude-sonnet-4-6`. For other models, including Nova Lite and inference profiles that start with `eu.`, AWS returns an error saying that the model doesn't support counting tokens.

### Create Chat Completion

Sends a conversation to a Bedrock model and returns the model's reply.

![AWS Bedrock - Create Chat Completion action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-create-chat-completion.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=67727c23843acf3a464580f4f72fb192)

1. *Model -* The model or inference profile that answers. Enter its Id, choose it from the list, or map the Id from a previous step. For example, `anthropic.claude-sonnet-4-6`.
2. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

**Notes:**

* Messages is required and is added through Add Field. It is the conversation so far, oldest first. Build it with [Initialize Object Array and Append to Object Array](#initialize-object-array): each message has a role (`user` or `assistant`) and its text.
* Optional fields include System Prompts (instructions for the model), Max Tokens, Temperature, Top P and Stop Sequences. Temperature and Top P accept values from 0 to 1, and not every model uses them.
* To apply a guardrail to the conversation, add Guardrail Id and Guardrail Version, and optionally Guardrail Trace.

### Generate Image

Creates an image from a text description using a Stability AI model on Amazon Bedrock.

![AWS Bedrock - Generate Image action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-generate-image.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=7113c31a87e0f10d8e6a496fdde9d620)

1. *Model -* Choose Stable Image Core, Stable Image Ultra or Stable Diffusion 3.5 Large.
2. *Region -* Choose the Region that runs the model. The image models are available in `us-west-2`, so enter `us-west-2`. If you leave it blank, the Region of your AWS Bedrock connection is used, and that Region may not have an image model.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

**Notes:**

* Prompt is required and is added through Add Field. Describe what to draw, for example "A red bicycle leaning on a brick wall".
* Optional fields: Avoid (what to leave out), Aspect Ratio (for example `16:9`, default `1:1`), Seed (a number from 0 to 4294967294, leave blank for a random image) and Image Format (PNG or JPEG, default PNG).
* The action returns the generated image as a base64 string, together with the seed and finish reason.

### Generate Text Embedding

Turns a piece of text into a list of numbers (an embedding) with the Titan Text Embeddings V2 model. Embeddings are used for search, matching and comparing the meaning of texts.

![AWS Bedrock - Generate Text Embedding action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-generate-text-embedding.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=0cd62abbab5ee3710cdd72df9eb2bb37)

* *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

**Notes:**

* Text is required and is added through Add Field. Enter the text to embed, for example a product description.
* Dimensions is optional: choose 256, 512 or 1024 (default 1024). A larger size keeps more detail.
* Normalize is optional and is on by default.

### Get Foundation Model

Retrieves the details of one Amazon Bedrock foundation model.

![AWS Bedrock - Get Foundation Model action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-get-foundation-model.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=583c51c76e3faa6e1b5e20baaaa712fc)

* *Model -* Enter the Id of the foundation model, choose it from the list, or map its Id from a previous step. The list shows the foundation models available in your connection's Region.

### Get Foundation Models

Retrieves the foundation models that are available in your connection's Region.

![AWS Bedrock - Get Foundation Models action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-get-foundation-models.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=ad8303af7288cf8ae1aa602568fb8143)

* *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).

**Note:** You can filter by Provider (for example Anthropic), Output Type (Text, Image or Embedding) and Inference Type (On demand or Provisioned).

### Get Inference Profiles

Retrieves the inference profiles in your connection's Region. An inference profile lets you call a model through a Region group, for example a profile whose Id starts with `eu.`.

![AWS Bedrock - Get Inference Profiles action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-get-inference-profiles.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=32b793067d72c6dedec2d44ead2cdc05)

1. *Top N -* You can set the maximum number of records Engini will return for the object you chose (default = all records).
2. *Add Filter -* Click Add Filter to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).

**Note:** You can filter by Type: System defined or Application.

### Invoke Model

Sends a request directly to a model in the format that the model expects. Use it for models and options that Create Chat Completion doesn't cover.

![AWS Bedrock - Invoke Model action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-invoke-model.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=5a59996db7d2ef918230007312cc0e2b)

1. *Model -* The model or inference profile to call. Enter its Id, choose it from the list, or map the Id from a previous step.
2. *Request Body -* The JSON that the model expects. Every model family defines its own format, so check the model's page in the Amazon Bedrock documentation.

Each model returns its answer in its own format. When you need the reply as a field in later steps, use Create Chat Completion instead.

### Initialize Object Array

Creates a new object array variable in your workflow to store structured AWS Bedrock data for use in later steps, for example the messages you send in Create Chat Completion.

![AWS Bedrock - Initialize Object Array action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-initialize-object-array.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=3a7262df1b44597dd94fdd42319b46e8)

1. *Variable Name -* Enter the name of the variable that will hold the object array. This name will be used throughout the workflow whenever you refer to this object array.
2. *Object Element Type -* Select the type of object the array will store. The selected type determines the structure of the array and opens its fields so you can fill in the values for the first entry.

### Append to Object Array

Adds a new entry to an existing object array variable in your workflow.

![AWS Bedrock - Append to Object Array action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-append-to-object-array.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=69fe87f2abb1009e55373c7b0dc5bf30)

1. *Variable -* Select the object array variable you want to append to. This must be an already initialized object array.
2. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

### Map Object Array

Transforms a list of data into a structured object array that can be used later in the workflow. It iterates over each item in the selected data list and maps it into a structured entry.

![AWS Bedrock - Map Object Array action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-map-object-array.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=2edc4b114dc78497e1d5013bfa67c100)

1. *Data List -* Select or map the array or list of data you want to iterate over and transform.
2. *Object Name -* Define the name of the temporary object that represents each item during the mapping. You will use this name when referencing fields from the current item.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

### Send API Request

This activity allows you to send a custom API request directly to the Amazon Bedrock runtime API.

![AWS Bedrock - Send API Request action](https://mintcdn.com/engini/EuVG4Tv9cFUbtDx4/help/assets/apps/aws-bedrock/aws-bedrock-send-api-request.png?fit=max\&auto=format\&n=EuVG4Tv9cFUbtDx4\&q=85\&s=ff7e8b61b44a8a52b0eab008d2d53666)

1. *Base Url -* The root URL of the Amazon Bedrock runtime API. It is filled in from your AWS Bedrock connection and can't be edited here.
2. *Relative url -* You can specify additional path segments or parameters that need to be added to the end of the Base Url. Enter only the path, for example `/model/anthropic.claude-sonnet-4-6/converse`. This allows you to customize the specific request you want to perform.
3. *Method -* Select the HTTP method (e.g., Get, Post, Put, Delete, Patch). The default is POST.
4. *Body Type -* Defines the format of the data in the body of your request. The default, application/json, means the body contains a JSON-formatted payload.
   * *application/json* – Sends the request body in JSON format. Commonly used by REST APIs.
   * *custom* – Allows you to define a custom body format by manually setting the Content-Type header. Add a `Content-Type` row in *Add Headers* with the media type you need (for example `application/xml`). With any other Body Type, a Content-Type you type in *Add Headers* is not sent; Engini sets it from the Body Type, and the run history shows it under `headersnotsent`.
   * *application/x-www-form-urlencoded* – Sends the body as URL-encoded key-value pairs, commonly used in form submissions.
   * *file* – Sends a file as the request body.
   * *multipart/form-data* – Sends form data that may include both text fields and files.
   * *text/html* – Sends the request body as HTML content.
   * *text/plain* – Sends the request body as plain text.
   * *text/xml* – Sends the request body in XML format.
5. *Body -* Contains any data that is being sent to the server.
6. *Add Headers -* Additional metadata about the request, such as the type of data Engini can accept, the length of the request body, and authentication information.
7. *Add Queries -* The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server.

Your Bedrock API key is sent automatically in an Authorization header. For the full list of endpoints, see the [Amazon Bedrock API reference](https://docs.aws.amazon.com/bedrock/latest/APIReference/).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.