该指南说明各组织如何利用行业标准协议和AWS服务,对亚马逊贝德罗克实施安全企业认证
该指南说明各组织如何利用行业标准协议和AWS服务,对亚马逊贝德罗克实施安全企业认证
This guidance enables enterprise deployment of Claude Code and Claude Cowork on Amazon Bedrock across command-line (CLI) and desktop surfaces — with secure single sign-on (SSO), usage monitoring, and cost controls.
This repository is now in maintenance mode on a best-efforts basis. It remains available as a reference implementation. New contributions without GitHub issues approved by maintainers will not be accepted.
For new deployments of Claude Apps on Amazon Bedrock, we recommend Claude Apps Gateway — a self-hosted service that sits between your Claude clients and your model provider. It is included in the claude binary, so the same executable that runs Claude Code also runs the gateway. It provides:
** Get started with Claude Apps Gateway on AWS**
** Deploying both Claude Code CLI and Claude Desktop? Add the Bootstrap Server** — delivers managed settings, organization plugins, and per-user configuration to Claude Desktop at sign-in.
Areas where this reference solution complements Claude Apps Gateway today
The following capabilities are not yet available in Claude Apps Gateway but may appear on its future roadmap. This solution provides reference patterns in the meantime:
As Claude Apps Gateway evolves, check Anthropic's documentation for the latest capabilities.
opusplan for Opus planning + Sonnet execution)This guidance integrates Claude Code CLI and Claude Desktop with your existing OIDC identity provider (Okta, Entra ID, Auth0, Google, or Cognito User Pools) to provide federated access to Amazon Bedrock.
Deployment time: 2-3 hours for initial setup. See QUICK_START.md for step-by-step instructions.
If you've deployed this guidance for Claude Code, extend it to Claude Cowork (Claude Desktop) with one command:
poetry run ccwb cowork generateThis generates MDM configuration files (JSON, macOS .mobileconfig, Windows .reg) using your existing deployment profile. See the CoWork 3P Guide for setup and deployment details.
The architecture is modular — start with authentication, then optionally add monitoring, quota enforcement, analytics, or distribution independently as requirements grow. This guidance supports three authentication paths (see Authentication Modes for details). The recommended path is Direct IAM Federation:
AssumeRoleWithWebIdentity with the OIDC ID tokenccwb init creates a profile that selects which stacks to enable. Deploy all at once with ccwb deploy, or individually with --stack :
| Component | What | Deployed via |
|---|---|---|
| Authentication | IAM OIDC Provider + federated role, or IDC auth stack | ccwb deploy --stack auth |
| User packages | Platform-specific binaries (credential-process, otel-helper) + install scripts | ccwb package |
| Monitoring (optional) | Central mode: ECS Fargate OTEL collector + ALB. Sidecar mode: local collector on each machine. Both export to CloudWatch dashboards. | ccwb deploy --stack monitoring |
| Quota enforcement (optional) | Quota check API + DynamoDB policies + per-user/team limits | ccwb deploy --stack quota |
| Analytics (optional) | S3 data lake + Athena for historical SQL queries on usage data | ccwb deploy --stack analytics |
| Distribution (optional) | S3 presigned URLs or self-service landing page with IdP auth | ccwb deploy --stack distribution |
| Diagnostics | Installation health checks + resolved config dump | ccwb doctor |
See Monitoring Guide, Quota Guide, Analytics Guide, and Distribution Comparison for detailed setup.
This guidance supports three identity paths. Each path provides usage monitoring and audit trails. Per-user identity resolution and quota enforcement depend on the authentication mode chosen.
| Mode | ccwb init choice |
Identity Source | Session Length | Quota Enforcement | Best For |
|---|---|---|---|---|---|
| External IdP (OIDC) | OIDC / Direct IdP |
Okta, Entra ID, Auth0, Google, Cognito User Pools JWT claims | Refresh token lifetime | ✅ Full | Orgs with an existing enterprise IdP |
| AWS IAM Identity Center | AWS IAM Identity Center |
AWSReservedSSO_* IAM role ARN (email in session name) |
Up to 90 days (recommended: 7 days) | ✅ Via SigV4 | Orgs on native AWS identity, or where OIDC localhost callback is blocked |
| None | None |
IAM user ARN or hashed role principal | AWS credential TTL | ❌ Not available | Internal tools / analytics-only deployments |
For deployment patterns and best practices, see the Claude Code deployment patterns and best practices with Amazon Bedrock blog post.
You can deploy the observability/analytics stack without configuring an identity provider. Select "None" during ccwb init.
Per-user usage attribution works across all authentication modes and Claude Code CLI and Claude Desktop (Cowork):
| Auth Mode | Identity Source | Telemetry Attribution | Quota Enforcement | CUR 2.0 Cost Visibility |
|---|---|---|---|---|
| OIDC | JWT email claim | Per-user (email, team, department) | ✅ | ✅ Per-user via STS session tags |
| IAM Identity Center | IAM ARN session name | Per-user (email only) | ✅ | ✅ Per-user if ABAC attributes configured in IDC |
| None | Hashed IAM principal | Anonymous | ❌ | ✅ Per-IAM-role |
Usage from both Claude Code CLI and Claude Desktop (Cowork) counts toward the same per-user limit — a single quota applies regardless of which surface consumed the tokens.
See Quota Monitoring Guide for enforcement details and CoWork 3P Guide for Desktop-specific behavior.
Once distributed, the credential-process binary runs on each user's machine:
credential_process in ~/.aws/config (AWS SDK calls it automatically)inferenceBedrockProfile MDM key pointing to the AWS profile that has credential_process setflowchart LR
CC1[Claude Code CLI] -->|needs credentials| CP[credential-process binary]
CC2[Claude Desktop] -->|needs credentials| CP
CP --> AUTH{Auth Mode}
AUTH -->|OIDC| OIDC[IdP → STS]
AUTH -->|IDC| IDC[SSO → STS]
OIDC --> OUT[Temporary AWS credentials]
IDC --> OUTThe otel-helper binary attaches per-user identity to telemetry:
otlpHeaders at sign-in. Claude Desktop applies these natively — no proxy or helper needed.otlpHeaders暂无开放 Issues,或尚未同步最近议题。