# AWS Bedrock

This page shows you how to configure yCrash to use Amazon Bedrock (opens new window).

After Bedrock is configured, yCrash calls it with the analyzed incident data and returns an AI summary. You can also chat with the Bedrock model while you troubleshoot the incident in yCrash. That conversation helps you find a solution for the root cause faster.

yCrash signs each request with AWS credentials. If a LiteLLM proxy already calls Bedrock, configure LiteLLM and set llmProvider to litellm.

# What you need in AWS

You need an AWS account with Bedrock turned on in one region, and the chat model enabled in that same region. In the Bedrock console this is Model access. A model that is enabled in us-east-1 is not automatically enabled in us-west-2.

The yCrash server needs outbound HTTPS to bedrock-runtime.<region>.amazonaws.com. From the yCrash server, this check should return HTTP 400 or 403:

curl -v https://bedrock-runtime.us-west-2.amazonaws.com
1

Those status codes mean the host answered. A timeout means a security group, firewall, or DNS path is blocking it. Replace us-west-2 with your region. If you use a VPC endpoint for Bedrock, put it in the same VPC as yCrash and allow TCP 443.

# Give yCrash permission to call the model

The IAM principal that yCrash uses needs permission to invoke the model. Attach a policy like this one. Change us-west-2 to the region you will put in llmRegion. You can also narrow Resource to the model ARN instead of *.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:RequestedRegion": "us-west-2"
        }
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

bedrock:InvokeModel is used for embeddings and for the streaming chat call. bedrock:InvokeModelWithResponseStream is required for the chat stream. Add bedrock:Guardrail* only if you have turned guardrails on. Add sts:AssumeRole only if yCrash should assume a different role.

How the credentials reach yCrash:

  • yCrash runs on EC2. Attach an instance profile to the instance and turn on IMDSv2. Leave llmApiKey and llmSecretKey out of the file. The instance receives temporary credentials on its own.
  • yCrash runs somewhere else. Create an IAM user, and put the access key id in llmApiKey and the secret access key in llmSecretKey in ycbuddy-config.json file.
  • The credentials are temporary STS credentials. Also set llmSessionToken, or the environment variable AWS_SESSION_TOKEN, and replace it before it expires.

AWS documents the service in the Bedrock User Guide (opens new window), including model ids (opens new window) and IAM actions (opens new window).

# Create the configuration file

Create ycbuddy-config.json in the upload directory (opens new window). The sample below is for a long-lived access key. On EC2 with an instance profile, delete llmApiKey and llmSecretKey.

{
  "llmProvider": "bedrock",
  "llmApiKey": "AKIA...",
  "llmSecretKey": "your-aws-secret-access-key",
  "llmRegion": "us-west-2",
  "llmModelName": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
  "llmEmbeddingModelName": "local-all-minilm-l6-v2-q"
}
1
2
3
4
5
6
7
8

Here is an explanation of each property in the JSON above:

  • llmProvider stays bedrock. A Claude model on Bedrock still uses bedrock. claude and anthropic send the request to Anthropic's own API instead.
  • llmApiKey is the AWS access key id. llmSecretKey is the secret access key. Swapping them makes AWS reject the signature. On EC2 you can leave both out when an instance profile supplies the credentials. You can also leave them out of the file and set the environment variables LLM_API_KEY or AWS_ACCESS_KEY_ID, and LLM_SECRET_KEY or AWS_SECRET_ACCESS_KEY. yCrash reads those variables only when the file does not already contain the value.
  • llmRegion is the region where you enabled the model, for example us-west-2. yCrash lowercases it and builds the request address from it. You can leave it out of the file and set the environment variable LLM_REGION, AWS_REGION, or AWS_DEFAULT_REGION.
  • llmSessionToken is needed only for temporary AWS credentials. Set it in the file, or set the environment variable LLM_SESSION_TOKEN or AWS_SESSION_TOKEN, and replace it before it expires.
  • llmModelName is the Bedrock model id. yCrash shortens it before looking it up, as described below. If you leave llmModelName out, yCrash uses anthropic.claude-3-5-sonnet-20241022-v2:0. That call works only when the model is enabled in the account and region.
  • llmEmbeddingModelName is the model yCrash uses to find related knowledge-base articles. Use local-all-minilm-l6-v2-q. It runs on the yCrash server and does not call Bedrock. To use a Bedrock embedding model instead, enter an id such as amazon.titan-embed-text-v2:0 and enable that model in the same region.

Do not set llmEndpoint or llmApiVersion. Those belong to Azure OpenAI and LiteLLM.

Files attached to a chat stay on the yCrash server. yCrash does not upload them to Bedrock.

Every property the file accepts is listed in ycbuddy-config.json settings.

Restart the yCrash application once the ycbuddy-config.json file is configured. How do you know LLM configuration succeeded shows the screen you should see. A team with its own role or region uses Team AI Settings.

# How much of the incident report yCrash sends

Each request yCrash sends to Bedrock has two limits:

  • maxAllowedTokens is how much of the incident report yCrash includes in the context. When this is not configured in the ycbuddy-config.json file, yCrash sends at most 20,000 tokens of the report.
  • llmMaxOutputTokens is how long the answer is allowed to be. When this is not configured in the ycbuddy-config.json file, the answer length is 4,096 tokens. The highest value yCrash will send is 128,000 tokens.

A token is a small piece of text. One word is often more than one token. The numbers in this section, such as 20,000 and 4,096, are token counts.

How yCrash reads the model registry

yCrash keeps a model registry. The registry is the list of model names yCrash already knows. Each name has two sizes:

  • Context window. How much text that model accepts.
  • Max output. How long an answer that model can return.

yCrash reads llmModelName from the ycbuddy-config.json file and shortens it before looking it up. It keeps only the text after the last /. It then drops a region prefix such as us., a vendor prefix such as anthropic., and a version ending such as -v1:0.

For example, us.anthropic.claude-sonnet-4-5-20250929-v1:0 is looked up as claude-sonnet-4-5-20250929.

You can set any Bedrock model id in llmModelName. yCrash sends that id to Bedrock. The limits yCrash already knows, after the shortening above, are the Claude limits on this page:

An Amazon, Meta, or Cohere id is not on that list. yCrash still calls it. The limits for a name that is not on the list are described below.

When yCrash finds the model in the registry

yCrash uses the context window and the max output from the registry.

To send a different amount of the incident report, or to allow a different answer length, set maxAllowedTokens and llmMaxOutputTokens in the ycbuddy-config.json file. Those two settings do not change the context window or the max output stored for that model in the registry.

maxAllowedTokens can be lower than the context window. yCrash then includes only the amount you configured. When maxAllowedTokens is not in the ycbuddy-config.json file, yCrash still sends at most 20,000 tokens of the incident report. That amount is smaller than the context window of most models in the registry, so one long incident is less likely to use up the Bedrock per-minute limit. For claude-sonnet-4-6, the context window is 1,000,000 tokens. Set maxAllowedTokens to 1000000 when you want yCrash to send that much of the incident report.

If you set maxAllowedTokens higher than the context window of the model, yCrash keeps the context window from the registry and ignores your maxAllowedTokens value. To send that higher number, also set allowContextAboveRegistry to true in the ycbuddy-config.json file. yCrash then uses your number instead of the registry number. Bedrock can reject a request that is larger than the model allows.

llmMaxOutputTokens sets the answer length. yCrash uses the number you configured, up to the max output in the registry. When llmMaxOutputTokens is not in the file, the answer length stays at 4,096 tokens.

When yCrash does not find the model

yCrash still calls Bedrock. The name is missing from the registry, so yCrash does not know that model's real context window or max output. An unknown name falls back to an internal default of 128,000 tokens of text and 4,096 tokens of answer. On Bedrock, the 20,000 limit from the start of this section is smaller than 128,000, so a missing maxAllowedTokens still sends 20,000 tokens of the report.

When maxAllowedTokens is not configured in the ycbuddy-config.json file, yCrash sends at most 20,000 tokens of the report. Set maxAllowedTokens to the size you want. yCrash uses that number instead of 20,000, including a number larger than 128,000. You do not need the allowContextAboveRegistry flag in the ycbuddy-config.json file.

When llmMaxOutputTokens is not in the ycbuddy-config.json file, the answer length stays at 4,096 tokens. You can set llmMaxOutputTokens when you want a longer or shorter answer. yCrash will not send a value higher than 128,000.

Note

A model name that is missing from the registry still runs. With neither setting in the file, yCrash uses 20,000 tokens of the report and an answer length of 4,096 tokens.

To add the model to the registry, email support@tier1app.com with the provider, the model id, and a link to the vendor's limits.

# When it does not work

Unsupported LLM provider means llmProvider is not bedrock.

MISSING_API_KEY, MISSING_SECRET_KEY, or MISSING_REGION means that value is missing from the file and from the environment. On EC2, a missing key is expected when the instance profile is attached. A missing region is not.

A timeout means the server cannot reach bedrock-runtime.<region>.amazonaws.com. Run the curl check above from the yCrash server.

HTTP 403 AccessDenied means the IAM policy is missing InvokeModel or InvokeModelWithResponseStream, or model access is not enabled in llmRegion.

HTTP 403 SignatureDoesNotMatch means the secret key is wrong, the key fields are swapped, the session token is missing or expired, or the server clock is skewed.

HTTP 404 means llmModelName is not a model id or inference profile in that region.

Embedding errors mean the Bedrock embedding model is not enabled in the same region. local-all-minilm-l6-v2-q avoids that call.

The troubleshooting checklist covers the file name and the restart. You can also open a support ticket (opens new window).