Skip to content

Commit a543283

Browse files
authored
update documentation for AWS Bedrock usage (#57)
1 parent 60d4122 commit a543283

3 files changed

Lines changed: 30 additions & 12 deletions

File tree

.env.example

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# ==============================================================================
22
# LYNKR CONFIGURATION - All Environment Variables
33
# Copy this file to .env and fill in your values
4+
#
5+
# FORMAT: Use plain KEY=VALUE syntax (no "export" prefix).
6+
# Good: MODEL_PROVIDER=bedrock
7+
# Bad: export MODEL_PROVIDER=bedrock
48
# ==============================================================================
59

610
# ==============================================================================
@@ -91,10 +95,18 @@ OPENROUTER_MAX_TOOLS_FOR_ROUTING=15
9195
# AWS Bedrock Configuration
9296
# ==============================================================================
9397

94-
# Generate from AWS Console → Bedrock → API Keys
95-
# AWS_BEDROCK_API_KEY=your-bedrock-bearer-token
98+
# IMPORTANT: Lynkr uses Bedrock API Key authentication (Bearer token),
99+
# NOT standard IAM credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY).
100+
#
101+
# Setup:
102+
# 1. Open AWS Console → Amazon Bedrock → API keys (left sidebar)
103+
# 2. Generate a long-term or short-term API key
104+
# 3. Copy the key (starts with ABSK) and set it below
105+
# Docs: https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-use.html
106+
#
107+
# AWS_BEDROCK_API_KEY=ABSK...your-bedrock-api-key
96108
# AWS_BEDROCK_REGION=us-east-1
97-
# AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
109+
# AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0
98110

99111
# ==============================================================================
100112
# llama.cpp Configuration (Local GGUF Models)

documentation/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ npm install -g lynkr
296296

297297
# Configure
298298
export MODEL_PROVIDER=bedrock
299-
export AWS_BEDROCK_API_KEY=AKIAIOSFODNN7EXAMPLE
299+
export AWS_BEDROCK_API_KEY=ABSK...your-bedrock-api-key
300300
export AWS_BEDROCK_REGION=us-east-1
301-
export AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
301+
export AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0
302302

303303
# Start
304304
lynkr start

documentation/providers.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,25 @@ LMSTUDIO_ENDPOINT=http://workstation.local:1234
137137

138138
```env
139139
MODEL_PROVIDER=bedrock
140-
AWS_BEDROCK_API_KEY=your-bearer-token
140+
AWS_BEDROCK_API_KEY=ABSK...your-api-key
141141
AWS_BEDROCK_REGION=us-east-1
142-
AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
142+
AWS_BEDROCK_MODEL_ID=us.anthropic.claude-3-5-sonnet-20241022-v2:0
143143
```
144144

145145
#### Getting AWS Bedrock API Key
146146

147+
> **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.
148+
147149
1. Log in to [AWS Console](https://console.aws.amazon.com/)
148-
2. Navigate to **Bedrock****API Keys**
149-
3. Click **Generate API Key**
150-
4. Copy the bearer token (this is your `AWS_BEDROCK_API_KEY`)
151-
5. Enable model access in Bedrock console
152-
6. See: [AWS Bedrock API Keys Documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html)
150+
2. Navigate to **Amazon Bedrock****API keys** (in the left sidebar)
151+
3. Generate a long-term or short-term API key
152+
4. Copy the API key (starts with `ABSK`) — this is your `AWS_BEDROCK_API_KEY`
153+
5. Enable model access in Bedrock console for your desired models
154+
6. See: [AWS Bedrock API Keys Documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-use.html)
155+
156+
> **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`).
157+
158+
> **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`).
153159
154160
#### Available Regions
155161

0 commit comments

Comments
 (0)