Skip to main content
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 with an identity that has permission to use Amazon Bedrock.

  • Switch to the Region you will connect, because a short-term key works only in the Region where it was generated.
  • In the left navigation pane, select API keys.
2

Generate the key

Create the key and copy it.

  • In the Short-term API keys tab, choose Generate short-term API keys.
  • Copy the key and store it securely.

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.

  • In the left navigation pane, select API keys.
2

Generate the key

Set the expiry and create the key.

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

Find your AWS Region

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

  • Enter the Region code, not the display name
  • Example: US East (N. Virginia) is us-east-1, and US West (Oregon) is us-west-2
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.