---
title: AWS Bedrock actions
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/aws/aws-bedrock
---

This page provides a reference for AWS Bedrock actions available in the workflow automation actions catalog. Use these actions to invoke Bedrock agents as part of your workflow definitions.

## Prerequisites

Before using AWS Bedrock actions in workflow automation, ensure you have:

-   An AWS account with appropriate permissions.
-   AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials). At least one credential option must be provided — IAM role takes precedence over static access keys.
-   The necessary IAM permissions for Bedrock operations (`bedrock:InvokeAgent`, `bedrock:InvokeModel`).

See [Set up AWS credentials](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/set-up-aws-credentials/) for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.

## Invoke a Bedrock agent

The action identifier is `aws.bedrock.invokeAgent`.

Invokes an AWS Bedrock agent with a prompt and returns the agent's response.

The following table describes the input fields for this action.

| **Input**            | **Type** | **Description**                                                                            | **Example**                                         |
| -------------------- | -------- | ------------------------------------------------------------------------------------------ | --------------------------------------------------- |
| `awsRoleArn`         | String   | Optional. IAM role ARN to assume for AWS API calls.                                        | `arn:aws:iam::123456789012:role/my-workflow-role`   |
| `awsAccessKeyId`     | String   | Optional. AWS access key ID. Pass as a secret.                                             | `${{ :secrets:awsAccessKeyId }}`                    |
| `awsSecretAccessKey` | String   | Optional. AWS secret access key. Pass as a secret.                                         | `${{ :secrets:awsSecretAccessKey }}`                |
| `awsSessionToken`    | String   | Optional. Temporary session token for STS authentication. Pass as a secret.                | `${{ :secrets:awsSessionToken }}`                   |
| `region`             | String   | Required. AWS region where the Bedrock agent is located.                                   | `us-east-2`                                         |
| `agentId`            | String   | Required. The unique identifier of the Bedrock agent.                                      | `Q123456789`                                        |
| `agentAliasId`       | String   | Required. The alias identifier for the Bedrock agent.                                      | `AL12345678`                                        |
| `inputText`          | String   | Required. The prompt to send to the agent.                                                 | `"What are the top 3 developments in AI?"`          |
| `sessionId`          | String   | Optional. Session identifier to maintain conversation context across multiple invocations. | `e1572683-d2dd-4904-a32a-36f398b52dd5`              |
| `parameters`         | Map      | Optional. Additional boto3 fields not otherwise modeled.                                   | `{"endSession": false}`                             |
| `selectors`          | List     | Optional. JQ selectors to extract specific fields from the action output.                  | `[{"name": "response", "expression": ".response"}]` |

The following table describes the output fields for this action.

| **Output**     | **Type** | **Example**                                                                                                                             |
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `response`     | Object   | `{"contentType": "application/json", "sessionId": "046d9e16-7b2b-4404-88c0-1fa8efb655a9", "completion": "Response from bedrock agent"}` |
| `success`      | Boolean  | `true` or `false`                                                                                                                       |
| `errorMessage` | String   | `"An error occurred (ValidationException) when calling the InvokeAgent operation"`                                                      |
