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

# Connect Amazon Bedrock with API Key – StackOne Hub

> Link a Amazon Bedrock account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using Amazon Bedrock actions.

> [!WARNING]
>
> Amazon Bedrock API keys can't call the Agents or Agents Runtime APIs, so actions on agents, knowledge bases, flows, prompts and sessions need the Access Key method instead.

## Generate a short-term API key

A short-term key lasts until your console session ends (at most 12 hours) and inherits the permissions of the identity that generates it. AWS recommends it for production use.

**1. Open API keys**

Sign in to the [Amazon Bedrock console](https://console.aws.amazon.com/bedrock) with an identity that has permission to use Amazon Bedrock.

<ul>
  <li>Switch to the Region you will connect, because a short-term key works only in the Region where it was generated.</li>
  <li>In the left navigation pane, select **API keys**.</li>
</ul>

**2. Generate the key**

Create the key and copy it.

<ul>
  <li>In the **Short-term API keys** tab, choose **Generate short-term API keys**.</li>
  <li>Copy the key and store it securely.</li>
</ul>

## Generate a long-term API key (alternative)

A long-term key lasts until the expiration date you choose and creates an IAM user with attached policies. AWS recommends long-term keys only for exploration.

**1. Open API keys**

Sign in to the [Amazon Bedrock console](https://console.aws.amazon.com/bedrock).

<ul>
  <li>In the left navigation pane, select **API keys**.</li>
</ul>

**2. Generate the key**

Set the expiry and create the key.

<ul>
  <li>In the **Long-term API keys** tab, choose **Generate long-term API keys**.</li>
  <li>Choose an expiration time and, optionally, add permissions in **Advanced permissions**.</li>
  <li>Choose **Generate**, then copy the key and store it securely.</li>
</ul>

## Find your AWS Region

Use the Region that hosts your Bedrock resources. For a short-term key, enter the Region it was generated in.

<ul>
  <li>Enter the Region code, not the display name</li>
  <li>Example: `US East (N. Virginia)` is `us-east-1`, and `US West (Oregon)` is `us-west-2`</li>
</ul>

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


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