AI provider
Connect the Anthropic account Hud uses to run PR analysis and remediation, with an Anthropic API key, a Bedrock API key or an AWS IAM role.
Hud's agentic workflows, the PR risk check and Auto Remediation, run on Anthropic's Claude models through your own AI provider account. Model usage is billed to that account, and neither workflow runs until a provider is connected.
You can connect Anthropic in one of three ways:
| Option | Best for | You provide |
|---|---|---|
| Claude Code (Anthropic API key) | The quickest setup | An Anthropic API key |
| Claude Code on Bedrock with an API key | Teams that run Anthropic models through AWS | A Bedrock API key and an AWS region |
| Claude Code on Bedrock with an IAM role | Teams whose security policy doesn't allow long-lived keys | An IAM role ARN and an AWS region |
To connect one, go to Settings → Agentic Workflows in Hud and select Connect provider on the AI provider card. Once it's saved, the card says which provider is set, and its menu has Edit and Disconnect.
One provider per accountThe AI provider applies to all agentic workflows in your Hud account. Saving a new provider replaces the previous one.
We'll add support for more models and AI providers over time. If you need help setting up your provider, chat with our support team or email [email protected].
Claude Code (Anthropic API key)
- Create an API key in the Anthropic Console.
- In Hud, select Claude Code, paste the key into API key, and select Save.
Claude Code on Bedrock (Bedrock API key)
- In the AWS console, open Amazon Bedrock → API keys and create a long-term API key. Short-term keys expire within hours, and workflows stop running when they do.
- Make sure Anthropic models are enabled in your AWS account and the key's identity can invoke them. See Enable Anthropic models in your AWS account and Bedrock permissions.
- Make sure Claude Opus 4.8 is available in your AWS account and region. Hud requires it. If it isn't available, contact AWS Sales or your AWS account team to enable it.
- In Hud, select Claude Code on Bedrock. If the drawer shows an Authentication choice, set it to API key. Paste the key into API key, enter the AWS region, and select Save.
Claude Code on Bedrock (IAM role)
Instead of sharing a key, you create an IAM role in your AWS account and let Hud assume it. Hud gets short-lived credentials each time it runs a workflow, and you can revoke access at any time by editing or deleting the role.
If the drawer shows no Authentication choice after you select Claude Code on Bedrock, the IAM role option isn't on for your account yet. Chat with our support team or email [email protected] to turn it on.
1. Get your values from Hud
In Hud, go to Settings → Agentic Workflows, select Connect provider on the AI provider card, then select Claude Code on Bedrock and set Authentication to IAM role. The drawer shows the values your role's trust policy needs:
- Hud account ID: the drawer lists two. Your role must trust both.
- Your account's External ID: a unique ID Hud generates for your account. It makes sure only Hud, acting for your account, can assume the role.
Keep the drawer open. You'll come back to it in the last step.
2. Create the role
In the AWS console, go to IAM → Roles → Create role and choose Custom trust policy. Paste this policy, replacing the placeholders with the values from the drawer:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::<HUD_AWS_ACCOUNT_ID_1>:root",
"arn:aws:iam::<HUD_AWS_ACCOUNT_ID_2>:root"
]
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": { "sts:ExternalId": "<EXTERNAL_ID>" }
}
}
]
}3. Grant Bedrock access
Make sure Anthropic models are enabled in your AWS account, including Claude Opus 4.8, and attach a permissions policy that lets the role invoke them. See Enable Anthropic models in your AWS account and Bedrock permissions for a ready-to-use policy.
4. Tag the role
Add the tag hud = allowed to the role. Hud only assumes roles that have this tag.
5. Connect it in Hud
Back in the drawer, paste the Role ARN (for example arn:aws:iam::123456789012:role/HudBedrockAccess) and enter the AWS region (for example us-east-1). Select Test role. When it says "The role can call Bedrock.", select Save. If the test fails, see If the role test fails.
Enable Anthropic models in your AWS account
Before Hud can call Anthropic models through Bedrock, your AWS account needs two one-time steps:
- Submit Anthropic's use-case form. In the AWS console, open Amazon Bedrock → Model catalog, choose any Anthropic model, and submit the form when prompted. You only do this once per AWS account, and approval is usually immediate.
- Allow AWS Marketplace subscriptions. Bedrock enables each Anthropic model through an AWS Marketplace subscription, which it creates automatically on the model's first invocation, using the caller's permissions. The Marketplace statement in Bedrock permissions grants these permissions.
Bedrock permissions
Both Bedrock options need permission to invoke Anthropic models. Hud runs several Anthropic models (Opus and Sonnet) and adds newer ones over time, so allow all Anthropic models rather than specific versions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:*:*:inference-profile/*anthropic.claude-*",
"arn:aws:bedrock:*::foundation-model/anthropic.claude-*"
]
},
{
"Sid": "MarketplaceSubscriptionThroughBedrock",
"Effect": "Allow",
"Action": [
"aws-marketplace:Subscribe",
"aws-marketplace:ViewSubscriptions",
"aws-marketplace:Unsubscribe"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:CalledViaLast": ["bedrock.amazonaws.com", "bedrock-mantle.amazonaws.com"]
}
}
}
]
}Things to know:
- Pick a
us-oreu-region. Hud calls Anthropic models through Bedrock's cross-region inference profiles:eu.profiles foreu-regions andus.profiles for all other regions. - Keep the region wildcard (
*) in the policy. Cross-region inference can route a request to any region in the profile, so the role needs access in all of them. - Include the Marketplace statement. Hud uses Anthropic's Opus and Sonnet models. When Hud calls a model your account doesn't have an AWS Marketplace subscription for yet, Bedrock uses these permissions to create one.
- Make sure Anthropic models are available in your AWS account. See Enable Anthropic models in your AWS account.
- Hud requires Claude Opus 4.8. AWS limits some newer Anthropic models, including Opus 4.8, to specific AWS accounts, so Bedrock can reject it even when everything else is set up. If Opus 4.8 isn't available in your AWS account, contact AWS Sales or your AWS account team to enable it.
- AWS Organization policies apply on top of your IAM permissions. If your AWS account is in an AWS Organization, its service control policies (SCPs) can block Bedrock even when the role or key allows everything. Make sure they allow Bedrock in every region your inference profile covers, and don't deny the Marketplace subscription. Only your organization's admins can change SCPs.
If the role test fails
- "The trust policy must require sts:ExternalId." Hud could assume the role without your External ID. Add the
sts:ExternalIdcondition from step 2. - "Could not assume the role." Check that the trust policy lists both Hud AWS account IDs, the External ID matches exactly, and the role has the
hud=allowedtag. - "Assumed the role, and Bedrock rejected the call." The role works, but Bedrock refused the call. Check the one-time setup, that Claude Opus 4.8 is available in your account, the permissions policy, and your organization's SCPs. To narrow it down, try Claude Opus 4.8 in the Bedrock playground yourself, in the same account and region. If it works there, the problem is in the role's permissions or an SCP that applies to the role.
Good to know
- API keys are stored encrypted and are never shown again after you save them. To change a setting such as the region, re-enter the key.
- Removing the AI provider stops all agentic workflows until you connect a new one.
Updated 12 days ago

