← Back to Hackathon Home

Claude Code + Amazon Bedrock

Hackathon Cheatsheet

Workshop: GenAI Hackathon on AWS Workshop Studio

Quick Setup

# 1. Enable Bedrock
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-west-2

# 2. Pin models (recommended — avoids defaulting to expensive Opus)
export ANTHROPIC_MODEL='us.anthropic.claude-sonnet-4-6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='us.anthropic.claude-haiku-4-5-20251001-v1:0'

# 3. Paste your Workshop Studio credentials (see below)
export AWS_ACCESS_KEY_ID="PASTE_HERE"
export AWS_SECRET_ACCESS_KEY="PASTE_HERE"
export AWS_SESSION_TOKEN="PASTE_HERE"

# 4. Launch
claude

At the login prompt → 3rd-party platformAmazon Bedrock


Getting & Refreshing Credentials

First time — getting credentials

  1. Log into your Workshop Studio event at the URL and access code provided by the event organiser
  2. In the left sidebar, click "Get AWS CLI credentials" (or the equivalent credentials panel)
  3. Copy the block containing AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN
  4. Paste into your terminal before launching claude

When credentials expire

You'll know they've expired when you see errors like:

To refresh:

  1. Go back to your Workshop Studio browser tab (keep it open throughout the hackathon)
  2. Click the credentials panel again — Workshop Studio will show you fresh credentials
  3. In your terminal, stop Claude Code (Ctrl+C or type /exit)
  4. Re-export all three credential variables with the new values:
    export AWS_ACCESS_KEY_ID="<new value>"
    export AWS_SECRET_ACCESS_KEY="<new value>"
    export AWS_SESSION_TOKEN="<new value>"
  5. Restart Claude Code:
    claude
💡 Tip: Credentials typically refresh every 1–4 hours. Keep your Workshop Studio browser tab open — you'll need it multiple times during the hackathon.
⚠️ Do NOT create IAM users or generate long-lived access keys. This violates Workshop Studio security policies and may trigger account termination.

Key Constraints

Item Limit
Bedrock regions us-west-2 and us-east-1 only
Models Only WS-approved models
GPU/Accelerated instances ❌ Not available (0 vCPU quota)
WebSearch tool ❌ Not available on Bedrock
Event duration Max 72 hours

Troubleshooting

Problem Fix
"Model not available" Use us.anthropic.claude-sonnet-4-6 (with us. prefix)
"On-demand throughput isn't supported" Switch to inference profile format: us.anthropic.claude-sonnet-4-6 not anthropic.claude-sonnet-4-6
Expired credentials Re-copy from Workshop Studio console, re-export, restart claude
Slow / throttled responses Shared capacity across all participants — use Haiku for background tasks

Tips