From f610cf14ecc9be5506471052b3be82b71566c77f Mon Sep 17 00:00:00 2001 From: ajaycj Date: Sun, 22 Feb 2026 19:11:32 -0800 Subject: [PATCH] update documentation for AWS Bedrock usage --- .env.example | 18 +++++++++++++++--- documentation/installation.md | 4 ++-- documentation/providers.md | 20 +++++++++++++------- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.env.example b/.env.example index 7c37a1f..7c6fcf7 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,10 @@ # ============================================================================== # LYNKR CONFIGURATION - All Environment Variables # Copy this file to .env and fill in your values +# +# FORMAT: Use plain KEY=VALUE syntax (no "export" prefix). +# Good: MODEL_PROVIDER=bedrock +# Bad: export MODEL_PROVIDER=bedrock # ============================================================================== # ============================================================================== @@ -91,10 +95,18 @@ OPENROUTER_MAX_TOOLS_FOR_ROUTING=15 # AWS Bedrock Configuration # ============================================================================== -# Generate from AWS Console → Bedrock → API Keys -# AWS_BEDROCK_API_KEY=your-bedrock-bearer-token +# IMPORTANT: Lynkr uses Bedrock API Key authentication (Bearer token), +# NOT standard IAM credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY). +# +# Setup: +# 1. Open AWS Console → Amazon Bedrock → API keys (left sidebar) +# 2. Generate a long-term or short-term API key +# 3. Copy the key (starts with ABSK) and set it below +# Docs: https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-use.html +# +# AWS_BEDROCK_API_KEY=ABSK...your-bedrock-api-key # AWS_BEDROCK_REGION=us-east-1 -# AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0 +# AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0 # ============================================================================== # llama.cpp Configuration (Local GGUF Models) diff --git a/documentation/installation.md b/documentation/installation.md index f600747..aa1f73a 100644 --- a/documentation/installation.md +++ b/documentation/installation.md @@ -296,9 +296,9 @@ npm install -g lynkr # Configure export MODEL_PROVIDER=bedrock -export AWS_BEDROCK_API_KEY=AKIAIOSFODNN7EXAMPLE +export AWS_BEDROCK_API_KEY=ABSK...your-bedrock-api-key export AWS_BEDROCK_REGION=us-east-1 -export AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0 +export AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0 # Start lynkr start diff --git a/documentation/providers.md b/documentation/providers.md index 6ef7450..acc5e71 100644 --- a/documentation/providers.md +++ b/documentation/providers.md @@ -137,19 +137,25 @@ LMSTUDIO_ENDPOINT=http://workstation.local:1234 ```env MODEL_PROVIDER=bedrock -AWS_BEDROCK_API_KEY=your-bearer-token +AWS_BEDROCK_API_KEY=ABSK...your-api-key AWS_BEDROCK_REGION=us-east-1 -AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0 +AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0 ``` #### Getting AWS Bedrock API Key +> **Important:** Lynkr uses Bedrock **API Key** authentication (Bearer token), NOT standard IAM credentials (`AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY`/`AWS_SESSION_TOKEN`). Standard IAM/SigV4 credentials will not work. + 1. Log in to [AWS Console](https://console.aws.amazon.com/) -2. Navigate to **Bedrock** → **API Keys** -3. Click **Generate API Key** -4. Copy the bearer token (this is your `AWS_BEDROCK_API_KEY`) -5. Enable model access in Bedrock console -6. See: [AWS Bedrock API Keys Documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html) +2. Navigate to **Amazon Bedrock** → **API keys** (in the left sidebar) +3. Generate a long-term or short-term API key +4. Copy the API key (starts with `ABSK`) — this is your `AWS_BEDROCK_API_KEY` +5. Enable model access in Bedrock console for your desired models +6. See: [AWS Bedrock API Keys Documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-use.html) + +> **Common Mistake:** Setting `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` will NOT work with Lynkr. You must use the Bedrock-specific API Key (`AWS_BEDROCK_API_KEY`, starts with `ABSK`). + +> **Model IDs:** When using API key auth, use inference profile model IDs with the region prefix (e.g., `us.anthropic.claude-3-5-sonnet-20241022-v2:0` instead of `anthropic.claude-3-5-sonnet-20241022-v2:0`). #### Available Regions