Unify Integrations
Logo
Amazon Bedrock

Amazon Bedrock

Logo

3 mins READ

Using Amazon Bedrock makes it easier to build and deploy generative AI applications at scale. It allows you to access and integrate powerful foundation models from leading AI providers, customize them for specific use cases, and optimize your AI workloads with minimal effort. Amazon Bedrock ensures your AI applications are scalable, reliable, and secure with robust data privacy controls and AWS's enterprise-grade security features.

Connecting your application to Amazon Bedrock lets you call foundation models and Bedrock agents, and run batch inference jobs, from your automations.

Authentication

Before you begin, make sure you have the following information:

  • Connection name: a name that identifies this connection in UnifyApps, such as "MyAppAmazonBedrockIntegration".

  • Region (required): the AWS region of your resources, such as us-east-1. If your AWS console URL starts with https://us-east-1.console.aws.amazon.com, enter us-east-1.

  • Authentication type: Access Key, IAM Role, Instance Role or API Key.

  • Request timeout duration (optional): how long, in seconds, a request can run before it times out.

  • Inference profile ID or ARN (optional): a Bedrock inference profile to send model calls through, such as a cross-region system profile ID or an application inference profile ARN.

The fields you fill in depend on the authentication type:

  • Access Key: enter the Access key ID and Secret access key of an IAM user (both required).

  • IAM Role: enter the ARN of an IAM role in the IAM Role field (required), and in External Id the external ID set on the role's trust relationship.

  • Instance Role: no keys are entered; the connection uses the IAM role of the environment that UnifyApps runs in. Use it only when UnifyApps runs inside your own AWS account.

  • API Key: enter an Amazon Bedrock API key in the API Key field (required).

Access Key Based Authentication

  1. Sign in to the AWS Management Console.

  2. Search for Users in the search bar at the top of the console and open Users in IAM (Identity and Access Management).

  3. Click Create user and enter a user name.

  4. Choose Attach policies directly and attach the AmazonBedrockFullAccess policy (or a policy that grants the Bedrock permissions you need). Click Create user.

  5. Open the new user, go to Security credentials and click Create access key.

  6. Choose Command Line Interface as the use case, add a description tag and click Create access key.

  7. Copy the access key ID and secret access key into the connection form. Store them securely; anyone with them can access your AWS account.

Frame 47.png
Frame 47.png

IAM Role Based Authentication

  1. Sign in to AWS Management Console (https://console.aws.amazon.com/) and select security credentials.

  2. Navigate to the IAM dashboard and click "Roles" > "Create role". (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)

  3. Under "Trusted entity type", choose the AWS account option.

  4. Select "Another AWS account" and input the UnifyApps AWS account ID (contact support to obtain this).

  5. Check the "Require external ID" box and enter the External ID provided by UnifyApps.

    Frame 48.png
    Frame 48.png

  6. Assign the necessary permissions for UnifyApps to operate automated workflows within your account.

  7. Give the IAM role a name and description.

  8. Click the "Select trusted entities" Edit button to modify trusted entity policies if needed. (Optional) 

  9. Click the "Add permissions" Edit button to adjust permissions. (Optional) 

  10.  If using object tags, select an appropriate tag for the IAM role. (Optional) 

  11.  Click on Create Role to finalize the process.

Create an IAM permissions policy 

  1. Go to the AWS Console and open the IAM console- https://console.aws.amazon.com/iam

  2. Navigate to Access management and select Policies.

  3. Choose Create Policy.

  4. Locate and choose the AWS service that UnifyApps will access.

  5. Select the required permissions under the Actions field.

  6. Define the resources that the role will have access to.

  7. Continue clicking Next until you reach the Review policy page.

  8. Provide a Name for the policy.

  9. Click Create policy once done.

Retrieve IAM role ARN

  1. Open the AWS Console and go to My Security Credentials > Roles.

  2. Search for the IAM role you need for the connection.

  3. Select the role to view its details.

  4. Copy the Role ARN for use in the UnifyApps connection setup.

Frame 49.png
Frame 49.png

API Key Based Authentication

  1. Sign in to the AWS Management Console and open Amazon Bedrock.

  2. Generate an Amazon Bedrock API key from the API keys page.

  3. In the connection form, choose API Key as the authentication type and paste the key into the API Key field. Store the key securely.

Actions

The following actions are supported in Amazon Bedrock, grouped by area.

Models

Action

Description

Analyse text

Analyse text to answer user-provided questions in Amazon Bedrock.

Categorise text

Classify text based on user-defined categories in Amazon Bedrock.

Draft email

Generate an email based on user description in Amazon Bedrock.

Generate images or modify existing images

Generate or modify images using prompts or other images in Amazon Bedrock.

Generate text embedding

Generates text embedding for the input text using Amazon Bedrock.

Rerank documents

Reranks documents based on their relevance to queries using Amazon Bedrock.

Send message to model

Send a message to models in Amazon Bedrock.

Send message using custom payload

Send a message to models using custom payload in Amazon Bedrock.

Summarize text

Get a summary of the input text in configurable length using Amazon Bedrock.

Translate text

Translate text between languages using Amazon Bedrock.

Agents

Action

Description

Create alias for agent

Creates agent aliases in Amazon Bedrock.

Create agent runtime session

Creates session for agent in Amazon Bedrock.

Get agent details

Gets agent details in Amazon Bedrock.

Invoke agent

Invokes an agent in Amazon Bedrock.

Invoke agent (Streaming)

Invokes an agent in Amazon Bedrock with streaming response. Returns chunks as they arrive.

List agent aliases

Lists agent aliases in Amazon Bedrock.

List agent knowledge bases

Lists agent knowledge bases in Amazon Bedrock.

List agents

Lists agents in Amazon Bedrock.

Prepare agent for use

Prepares an agent in Amazon Bedrock.

Batch inference

Action

Description

Create model invocation job

Creates a model invocation job in Amazon Bedrock.

Get model invocation job

Retrieves model invocation job execution details.

List batch inference jobs

Lists available batch inference jobs in Amazon Bedrock.

List model invocation jobs

Lists available model invocation jobs in Bedrock.

Stop model invocation job

Stops an active model invocation job execution.

Responses

Action

Description

Cancel response

Cancels an in-progress model response in Amazon Bedrock.

Compact response

Compacts a model response in Amazon Bedrock.

Create model response

Creates a model response in Amazon Bedrock.

Create response stream

Create a response stream in Amazon Bedrock.

Create response stream using custom payload

Create a response stream using custom payload in Amazon Bedrock.

Delete model response

Deletes a model response in Amazon Bedrock.

Get input token counts

Gets input token counts for a model response in Amazon Bedrock.

Get model response

Retrieves an existing model response in Amazon Bedrock.

List input items

Lists input items for a model response in Amazon Bedrock.