This guide explains the steps to provision an Anthropic model through Amazon Bedrock to be used by Claude Code running within a beam. This guide covers setting up Teleport Beams as an OIDC provider in AWS, granting the required permissions and creating an LLM proxy. The steps are the same for any compatible model.
Built-in inference is for evaluation only. Connect your own inference provider for regular use and production workloads.
Beams offers a convenient connection to Amazon Bedrock via an AWS OIDC integration. To view the latest supported models, visit AWS: Models at a glance.
How it works
Beam instances access inference models securely through an LLM proxy hosted by your Teleport cluster. The proxy authorizes and forwards requests to the inference provider (Amazon Bedrock) and passes responses back to the beam. Tools and SDKs running in a beam that support the Anthropic Messages API or OpenAI Responses API reach these endpoints transparently.
Switching inference providers is simply a process of creating a new LLM proxy for the provider and configuring beams to use it. Beams have two provider slots, one supporting providers using the Anthropic Messages API and the other supporting providers using the OpenAI Responses API.
Existing beams will continue to use the providers configured when they were created, while new beams will use the newly set LLM proxy.
Prerequisites
Install the client tools and sign in
Beams is a Teleport project and uses official Teleport client tools.
The client tools include tsh to sign in and run commands, and tctl to administer your cluster if you have permission.
Cluster: example.beams.run. Edit this example to use your cluster name.
Install version 18.11.10 of the client:
Download and open the macOS installer, then follow its instructions.
curl -O https://cdn.teleport.dev/teleport-tools-18.11.10.pkg
open teleport-tools-18.11.10.pkgFor Linux x86-64, download and install the client tools:
curl -O https://cdn.teleport.dev/teleport-v18.11.10-linux-amd64-bin.tar.gz
tar -xzf teleport-v18.11.10-linux-amd64-bin.tar.gz
sudo ./teleport/installFor Windows x86-64, run these commands in PowerShell. Add the extraction directory ($env:LOCALAPPDATA\Teleport) to your user PATH to use tsh in future terminals; the last command adds it to this terminal's PATH.
Invoke-WebRequest -Uri https://cdn.teleport.dev/teleport-v18.11.10-windows-amd64-bin.zip -OutFile teleport.zip
Expand-Archive -Path teleport.zip -DestinationPath "$env:LOCALAPPDATA\Teleport" -Force
$env:Path += ";$env:LOCALAPPDATA\Teleport"Follow the official client tools install guide for other versions and architectures.
Check that you’re running v18.11.10 of the client with tsh version.
tsh versionI sign in without a password (e.g. a passkey).
tsh login --proxy='example.beams.run' --auth=passwordlessI have a password & MFA set up for my account:
Replace you@example.com with your Teleport username.
tsh login --proxy='example.beams.run' --user=you@example.comI sign in with SSO (e.g. Okta, GitHub, SAML).
tsh login --proxy='example.beams.run'-
A Teleport Beams cluster. Start your free trial.
-
An active Teleport session and
tshversion 18.11.9 or newer. This guide also usestctlto configure the cluster. -
The AWS CLI,
curl,jq, anduuidgen(or another way to generate a UUID). -
An active AWS CLI session in the account where you’ll create the IAM resources. Run
aws sts get-caller-identityto confirm the account ID before continuing. -
AWS permissions to create and tag an OIDC provider, create an IAM role, and attach an inline policy.
-
Teleport permissions to create and test an integration, register and use an LLM app, configure Beams, and create a test beam with the
beam-userrole. -
A chosen model, ensuring the following:
- The model is available in Amazon Bedrock via the
bedrock-mantleendpoint - For Anthropic-compatible models, the Messages API is supported
- For OpenAI-compatible models, the Responses API is supported
- The model is available in a region that suits your use case (default is
us-east-1)
- The model is available in Amazon Bedrock via the
Step 1/4. Configure an AWS OIDC integration
Set these example values before copying the commands. The provider URL is your Teleport cluster’s public HTTPS URL, without a trailing slash. Use the same hostname without https:// for Provider hostname, which appears in IAM trust keys and ARNs. Use your 12-digit AWS account ID.
Provider URL: https://teleport.example.com. Provider hostname: teleport.example.com. Integration name: my-integration. AWS account ID: 123456789012.
If you already have an aws-oidc integration, use its name and IAM role. Check it with tctl get integration, skip the creation steps below, and continue with Step 2 if the role still needs Bedrock permissions.
To configure a new integration, start by creating an identity provider in AWS. Use the aws iam create-open-id-connect-provider CLI command, or create the identity provider through the AWS Console. Use the following configuration:
-
Provider type: OpenID Connect
-
Provider URL:
https://teleport.example.com -
Audience:
discover.teleport -
Tags:
teleport.dev/cluster:teleport.example.comteleport.dev/origin:integration_awsoidcteleport.dev/integration:my-integration
For the CLI workflow, save this as beams-oidc-provider.json:
{
"Url": "https://teleport.example.com",
"ClientIDList": ["discover.teleport"],
"Tags": [
{"Key": "teleport.dev/cluster", "Value": "teleport.example.com"},
{"Key": "teleport.dev/origin", "Value": "integration_awsoidc"},
{"Key": "teleport.dev/integration", "Value": "my-integration"}
]
}Create the provider and save the AWS response, which contains its ARN. If an IAM OIDC provider already exists for that URL, don’t create a duplicate: confirm it allows the discover.teleport audience, then save a JSON object with its ARN as OpenIDConnectProviderArn in beams-oidc-provider-result.json.
aws iam create-open-id-connect-provider --cli-input-json file://beams-oidc-provider.json \
--output json > beams-oidc-provider-result.jsonUse that ARN to generate beams-oidc-trust.json. Review the policy before creating the role. It lets your Teleport cluster assume the IAM role through the OIDC provider you just created.
jq -e '
(.OpenIDConnectProviderArn | strings) as $arn
| ($arn | split(":oidc-provider/")[1] | strings | select(length > 0)) as $host
| {
Version: "2012-10-17",
Statement: [{
Effect: "Allow",
Principal: {Federated: $arn},
Action: "sts:AssumeRoleWithWebIdentity",
Condition: {StringEquals: {($host + ":aud"): "discover.teleport"}}
}]
}' beams-oidc-provider-result.json > beams-oidc-trust.jsonCreate the role from that file and note the returned ARN:
aws iam create-role \
--role-name beams-oidc \
--assume-role-policy-document file://beams-oidc-trust.json \
--query Role.Arn --output textSave the following as awsoidc-integration.yaml. Use the ARN returned above if it differs from the example.
kind: integration
sub_kind: aws-oidc
version: v1
metadata:
name: "my-integration"
spec:
aws_oidc:
role_arn: "arn:aws:iam::123456789012:role/beams-oidc"Create the resource:
tctl create awsoidc-integration.yamlValidate the new integration is operational using the tctl integration test utility:
tctl integrations test 'my-integration'See the dedicated AWS OIDC guide for more details.
Step 2/4. Grant Amazon Bedrock permissions
The integration’s IAM role needs permission to invoke Bedrock models. Save the following permissions policy as beams-bedrock-policy.json.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["bedrock-mantle:CreateInference"],
"Resource": "arn:aws:bedrock-mantle:*:*:project/*"
},
{
"Effect": "Allow",
"Action": [
"aws-marketplace:Subscribe",
"aws-marketplace:ViewSubscriptions"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:CalledViaLast": "bedrock-mantle.amazonaws.com"
}
}
}
]
}The policy above gives access to all Bedrock Mantle projects. Projects provide a useful way to track token usage and costs. Currently, the Amazon Bedrock integration uses the default project only.
The aws-marketplace:Subscribe and aws-marketplace:ViewSubscriptions actions are required for Mantle to automatically create subscriptions when models are first used.
Attach the saved policy to the role from Step 1. If you reused an integration, replace beams-oidc with its IAM role’s name.
aws iam put-role-policy \
--role-name beams-oidc \
--policy-name beams-bedrock \
--policy-document file://beams-bedrock-policy.jsonStep 3/4. Configure an LLM proxy
An LLM proxy exposes Bedrock models to beam instances. It can also be used by authenticated cluster users via a local proxy.
Save the following as llm-proxy.yaml. Replace REPLACE_WITH_UUID with a fresh UUID from uuidgen. Check that the model is available through Bedrock Mantle in the selected region before creating the proxy.
kind: app_server
version: v3
metadata:
name: beams-anthropic
spec:
host_id: REPLACE_WITH_UUID
app:
kind: app
sub_kind: llm
version: v3
metadata:
name: beams-anthropic
labels:
teleport.internal/beams/app-type: llm
spec:
public_addr: "beams-anthropic.teleport.example.com"
integration: "my-integration"
aws:
region: us-east-1
inference:
format: anthropic
provider: bedrock
models:
- name: claude-opus-4-8
provider_name: anthropic.claude-opus-4-8To set shared token limits for this connection, see Budgets.
The teleport.internal/beams/app-type: llm label grants access through the built-in beam-user role. Anyone with that role can use this connection, which can incur AWS charges.
This configuration allows only claude-opus-4-8. Remove the models list from the inference block to expose all available models. The model name is the name used in an inference request, while the model provider_name is the Amazon Bedrock ID for the model. Discover model IDs in the Amazon Bedrock model cards.
Create the resource:
tctl create llm-proxy.yamlCheck that beams-anthropic appears in the app list, then start the local proxy and leave it running:
tsh apps ls
tsh proxy app --port 56789 beams-anthropicOpen a second terminal to send a test request:
export ANTHROPIC_API_URL=http://localhost:56789
response=$(curl --fail-with-body --silent --show-error \
-X POST "$ANTHROPIC_API_URL/v1/messages" \
-H "Content-Type: application/json" -H "anthropic-version: 2023-06-01" \
-d '{"model":"claude-opus-4-8","max_tokens":256,"messages":[{"role":"user","content":"Hello!"}]}') &&
printf '%s\n' "$response" | jq -er '[.content[]? | select(.type == "text") | .text][0] | select(length > 0)'A successful response from the model means the LLM proxy is operational and your user has permission to access it.
To expose models supporting the OpenAI Responses API, repeat this step to create another LLM proxy, changing the inference.format to openai.
Step 4/4. Update the global beams config
This step changes the Anthropic connection for all new beams in the cluster. Existing beams keep their original connection.
Run tctl get beams_config first. If a configuration already exists, do not overwrite it with the example. Follow Use the connection in new beams to change only the Anthropic route.
If no configuration exists, save this as beams-config.yaml. It routes Anthropic requests to beams-anthropic and keeps OpenAI requests on the built-in openai connection.
kind: beams_config
version: v1
metadata:
name: beams-config
spec:
llm:
anthropic:
app_name: beams-anthropic
openai:
app_name: openaitctl create beams-config.yamlValidate the beams config changes have had an effect by inspecting the config available to a new beam and sending a test request:
beam_id=$(tsh beams add --roles=beam-user --no-share-connected-accounts \
--no-console --format=json | jq -er '.id') &&
tsh beams exec "$beam_id" -- 'printf "%s\n" "$ANTHROPIC_BASE_URL"' &&
tsh beams exec "$beam_id" -- 'claude -p --model claude-opus-4-8 "Reply with hello in one sentence."'Expect the beam to print its Anthropic endpoint and return a model reply. To confirm the request reached the new connection, run tctl llm usage --endpoint=beams-anthropic before and after the test. Usage is batched and can take a few minutes to appear. When you’re done, delete the test beam with tsh beams rm "$beam_id".