Claude Platform Docs
API 参考支持与配置

Claude Platform on AWS 的 IAM 操作

通过 AWS 策略控制对 Claude Platform on AWS 访问权限的 IAM 操作参考。

Claude Platform on AWS 使用 AWS IAM 进行访问控制。每个 API 路由都映射到 aws-external-anthropic 命名空间中的一个 IAM 操作。本页面列出了所有操作、每个操作所授权的路由,以及适用于常见访问模式的托管策略。有关平台设置和身份验证,请参阅 Claude Platform on AWS。

服务详情

属性值
IAM 服务前缀aws-external-anthropic
资源类型workspace

工作区 ARN 格式:

arn:aws:aws-external-anthropic:{region}:{account-id}:workspace/{workspace-id}

ARN 中的区域始终会被填充,并与工作区所绑定的区域一致。资源段是带标签的工作区 ID(wrkspc_...),与您在 anthropic-workspace-id 标头中传递的值相同。

操作

操作遵循 AWS 的 VerbNoun 命名约定,并严格规范动词的使用,使 Get* 和 List* "wildcard"(通配符)能够形成清晰的只读边界。

推理

操作授权的路由
CreateInferencePOST /v1/messages
CountTokensPOST /v1/messages/count_tokens

批处理

操作授权的路由
CreateBatchInferencePOST /v1/messages/batches
GetBatchInferenceGET /v1/messages/batches/{id}
GET /v1/messages/batches/{id}/results
ListBatchInferencesGET /v1/messages/batches
CancelBatchInferencePOST /v1/messages/batches/{id}/cancel
DeleteBatchInferenceDELETE /v1/messages/batches/{id}

模型

操作授权的路由
GetModelGET /v1/models/{id}
ListModelsGET /v1/models

文件

操作授权的路由
CreateFilePOST /v1/files
GetFileGET /v1/files/{id}
GET /v1/files/{id}/content
ListFilesGET /v1/files
DeleteFileDELETE /v1/files/{id}

技能

操作授权的路由
CreateSkillPOST /v1/skills
GetSkillGET /v1/skills/{id}
GET /v1/skills/{id}/versions
GET /v1/skills/{id}/versions/{version}
GET /v1/skills/{id}/versions/{version}/content
ListSkillsGET /v1/skills
UpdateSkillPOST /v1/skills/{id}/versions
DELETE /v1/skills/{id}/versions/{version}
DeleteSkillDELETE /v1/skills/{id}

代理

操作授权的路由
CreateAgentPOST /v1/agents
GetAgentGET /v1/agents/{id}
GET /v1/agents/{id}/versions
ListAgentsGET /v1/agents
UpdateAgentPOST /v1/agents/{id}
ArchiveAgentPOST /v1/agents/{id}/archive

会话

操作授权的路由
CreateSessionPOST /v1/sessions
GetSessionGET /v1/sessions/{id}
GET /v1/sessions/{id}/events
GET /v1/sessions/{id}/events/stream
GET /v1/sessions/{id}/resources
GET /v1/sessions/{id}/resources/{id}
ListSessionsGET /v1/sessions
UpdateSessionPOST /v1/sessions/{id}
POST /v1/sessions/{id}/events
POST /v1/sessions/{id}/resources
POST /v1/sessions/{id}/resources/{id}
DELETE /v1/sessions/{id}/resources/{id}
ArchiveSessionPOST /v1/sessions/{id}/archive
DeleteSessionDELETE /v1/sessions/{id}

环境

操作授权的路由
CreateEnvironmentPOST /v1/environments
GetEnvironmentGET /v1/environments/{id}
GET /v1/environments/{id}/work
GET /v1/environments/{id}/work/{work_id}
GET /v1/environments/{id}/work/stats
ListEnvironmentsGET /v1/environments
UpdateEnvironmentPOST /v1/environments/{id}
ArchiveEnvironmentPOST /v1/environments/{id}/archive
DeleteEnvironmentDELETE /v1/environments/{id}
ProcessEnvironmentWorkGET /v1/environments/{id}/work/poll
POST /v1/environments/{id}/work/{work_id}
POST /v1/environments/{id}/work/{work_id}/ack
POST /v1/environments/{id}/work/{work_id}/heartbeat
POST /v1/environments/{id}/work/{work_id}/stop

保管库

操作授权的路由
CreateVaultPOST /v1/vaults
GetVaultGET /v1/vaults/{id}
GET /v1/vaults/{id}/credentials
GET /v1/vaults/{id}/credentials/{id}
ListVaultsGET /v1/vaults
UpdateVaultPOST /v1/vaults/{id}
POST /v1/vaults/{id}/credentials
POST /v1/vaults/{id}/credentials/{id}
POST /v1/vaults/{id}/credentials/{id}/archive
DELETE /v1/vaults/{id}/credentials/{id}
ArchiveVaultPOST /v1/vaults/{id}/archive
DeleteVaultDELETE /v1/vaults/{id}

记忆存储

操作授权的路由
CreateMemoryStorePOST /v1/memory_stores
GetMemoryStoreGET /v1/memory_stores/{id}
GET /v1/memory_stores/{id}/memories
GET /v1/memory_stores/{id}/memories/{id}
GET /v1/memory_stores/{id}/memory_versions
GET /v1/memory_stores/{id}/memory_versions/{id}
ListMemoryStoresGET /v1/memory_stores
UpdateMemoryStorePOST /v1/memory_stores/{id}
POST /v1/memory_stores/{id}/memories
POST /v1/memory_stores/{id}/memories/{id}
DELETE /v1/memory_stores/{id}/memories/{id}
POST /v1/memory_stores/{id}/memory_versions/{id}/redact
ArchiveMemoryStorePOST /v1/memory_stores/{id}/archive
DeleteMemoryStoreDELETE /v1/memory_stores/{id}

Webhook

操作授权的路由
CreateWebhookPOST /v1/webhooks
GetWebhookGET /v1/webhooks/{id}
ListWebhooksGET /v1/webhooks
UpdateWebhookPOST /v1/webhooks/{id}
DeleteWebhookDELETE /v1/webhooks/{id}
RotateWebhookSecretPOST /v1/webhooks/{id}/regenerate_signing_secret

用户配置文件

操作授权的路由
CreateUserProfilePOST /v1/user_profiles
GetUserProfileGET /v1/user_profiles/{id}
ListUserProfilesGET /v1/user_profiles
UpdateUserProfilePOST /v1/user_profiles/{id}
CreateUserProfileEnrollmentUrlPOST /v1/user_profiles/{id}/enrollment_url

工作区

操作授权的路由
CreateWorkspacePOST /v1/organizations/workspaces
GetWorkspaceGET /v1/organizations/workspaces/{id}
ListWorkspacesGET /v1/organizations/workspaces
UpdateWorkspacePOST /v1/organizations/workspaces/{id}
ArchiveWorkspacePOST /v1/organizations/workspaces/{id}/archive

加密密钥

操作授权的路由
RegisterKeyPOST /v1/organizations/external_keys
GetKeyGET /v1/organizations/external_keys/{id}
ListKeysGET /v1/organizations/external_keys
UpdateKeyPOST /v1/organizations/external_keys/{id}
DisableKeyDELETE /v1/organizations/external_keys/{id}

合规

操作授权的路由
ListComplianceActivitiesGET /v1/compliance/activities

遥测目标

操作授权的路由
CreateAccountTelemetryDestinationPOST /v1/organizations/telemetry_destinations
GetAccountTelemetryDestinationGET /v1/organizations/telemetry_destinations/{id}
ListAccountTelemetryDestinationsGET /v1/organizations/telemetry_destinations
UpdateAccountTelemetryDestinationPOST /v1/organizations/telemetry_destinations/{id}
DeleteAccountTelemetryDestinationDELETE /v1/organizations/telemetry_destinations/{id}
TestAccountTelemetryDestinationPOST /v1/organizations/telemetry_destinations/{id}/test
ListAccountTelemetryDestinationWorkspacesGET /v1/organizations/telemetry_destinations/{id}/workspaces
AddTelemetryDestinationWorkspacePOST /v1/organizations/telemetry_destinations/{id}/workspaces/{workspace_id}
RemoveTelemetryDestinationWorkspaceDELETE /v1/organizations/telemetry_destinations/{id}/workspaces/{workspace_id}

身份验证

操作授权的路由
CallWithBearerToken(无)

CallWithBearerToken 是一项身份验证层权限,授权主体通过 API 密钥(bearer token,持有者令牌)而非 AWS SigV4 进行身份验证。它不映射到任何路由。请将其与您希望 API 密钥持有者能够执行的路由映射操作一起授予。

控制台访问

操作授权的路由
AssumeConsole(无)

AssumeConsole 授权主体通过 AWS Console 联合登录流程为 Claude Platform on AWS 工作区打开 Claude Console。它不映射到任何路由。请将其授予应当能够在 AWS Console 中 Claude Platform on AWS 服务页面上点击 Open Claude Console 的主体。Claude Console 角色(Admin 或 Developer)由您的 Anthropic 客户代表单独分配;它并非从主体的 IAM 权限派生而来。有关登录流程和角色说明,请参阅使用 Claude Console。

路由到操作映射

下表列出了 Claude Platform on AWS 上的每个路由以及调用它所需的 IAM 操作。每个 IAM 操作同时也授权使用 anthropic-beta 标头的请求;路由的 beta 变体不需要单独的 IAM 操作。CloudTrail 将每个操作分类为 Data 事件(高容量的数据平面操作)或 Management 事件(控制平面操作)。保管库和 webhook 操作被分类为 Management 事件,因为它们持有密钥(保管库凭证和 webhook 签名密钥),并受益于默认开启的审计日志记录。工作区、外部密钥、遥测目标和合规操作也被分类为 Management 事件,因为它们是组织范围的控制平面操作。所有其他操作,包括推理、批处理、模型、文件、技能、用户配置文件以及其余的 Claude Managed Agents 操作,均被分类为 Data 事件。

方法路由IAM 操作CloudTrail 事件类型
POST/v1/messagesCreateInferenceData
POST/v1/messages/count_tokensCountTokensData
POST/v1/messages/batchesCreateBatchInferenceData
GET/v1/messages/batchesListBatchInferencesData
GET/v1/messages/batches/{id}GetBatchInferenceData
GET/v1/messages/batches/{id}/resultsGetBatchInferenceData
POST/v1/messages/batches/{id}/cancelCancelBatchInferenceData
DELETE/v1/messages/batches/{id}DeleteBatchInferenceData
GET/v1/modelsListModelsData
GET/v1/models/{id}GetModelData
POST/v1/filesCreateFileData
GET/v1/filesListFilesData
GET/v1/files/{id}GetFileData
GET/v1/files/{id}/contentGetFileData
DELETE/v1/files/{id}DeleteFileData
POST/v1/skillsCreateSkillData
GET/v1/skillsListSkillsData
GET/v1/skills/{id}GetSkillData
DELETE/v1/skills/{id}DeleteSkillData
POST/v1/skills/{id}/versionsUpdateSkillData
GET/v1/skills/{id}/versionsGetSkillData
GET/v1/skills/{id}/versions/{version}GetSkillData
GET/v1/skills/{id}/versions/{version}/contentGetSkillData
DELETE/v1/skills/{id}/versions/{version}UpdateSkillData
POST/v1/user_profilesCreateUserProfileData
GET/v1/user_profilesListUserProfilesData
GET/v1/user_profiles/{id}GetUserProfileData
POST/v1/user_profiles/{id}UpdateUserProfileData
POST/v1/user_profiles/{id}/enrollment_urlCreateUserProfileEnrollmentUrlData
POST/v1/organizations/workspacesCreateWorkspaceManagement
GET/v1/organizations/workspacesListWorkspacesManagement
GET/v1/organizations/workspaces/{id}GetWorkspaceManagement
POST/v1/organizations/workspaces/{id}UpdateWorkspaceManagement
POST/v1/organizations/workspaces/{id}/archiveArchiveWorkspaceManagement
POST/v1/organizations/external_keysRegisterKeyManagement
GET/v1/organizations/external_keysListKeysManagement
GET/v1/organizations/external_keys/{id}GetKeyManagement
POST/v1/organizations/external_keys/{id}UpdateKeyManagement
DELETE/v1/organizations/external_keys/{id}DisableKeyManagement
POST/v1/organizations/telemetry_destinationsCreateAccountTelemetryDestinationManagement
GET/v1/organizations/telemetry_destinationsListAccountTelemetryDestinationsManagement
GET/v1/organizations/telemetry_destinations/{id}GetAccountTelemetryDestinationManagement
POST/v1/organizations/telemetry_destinations/{id}UpdateAccountTelemetryDestinationManagement
DELETE/v1/organizations/telemetry_destinations/{id}DeleteAccountTelemetryDestinationManagement
POST/v1/organizations/telemetry_destinations/{id}/testTestAccountTelemetryDestinationManagement
GET/v1/organizations/telemetry_destinations/{id}/workspacesListAccountTelemetryDestinationWorkspacesManagement
POST/v1/organizations/telemetry_destinations/{id}/workspaces/{workspace_id}AddTelemetryDestinationWorkspaceManagement
DELETE/v1/organizations/telemetry_destinations/{id}/workspaces/{workspace_id}RemoveTelemetryDestinationWorkspaceManagement
GET/v1/compliance/activitiesListComplianceActivitiesManagement
POST/v1/agentsCreateAgentData
GET/v1/agentsListAgentsData
GET/v1/agents/{id}GetAgentData
POST/v1/agents/{id}UpdateAgentData
POST/v1/agents/{id}/archiveArchiveAgentData
GET/v1/agents/{id}/versionsGetAgentData
POST/v1/sessionsCreateSessionData
GET/v1/sessionsListSessionsData
GET/v1/sessions/{id}GetSessionData
POST/v1/sessions/{id}UpdateSessionData
POST/v1/sessions/{id}/archiveArchiveSessionData
DELETE/v1/sessions/{id}DeleteSessionData
GET/v1/sessions/{id}/eventsGetSessionData
POST/v1/sessions/{id}/eventsUpdateSessionData
GET/v1/sessions/{id}/events/streamGetSessionData
GET/v1/sessions/{id}/resourcesGetSessionData
GET/v1/sessions/{id}/resources/{id}GetSessionData
POST/v1/sessions/{id}/resourcesUpdateSessionData
POST/v1/sessions/{id}/resources/{id}UpdateSessionData
DELETE/v1/sessions/{id}/resources/{id}UpdateSessionData
POST/v1/environmentsCreateEnvironmentData
GET/v1/environmentsListEnvironmentsData
GET/v1/environments/{id}GetEnvironmentData
POST/v1/environments/{id}UpdateEnvironmentData
POST/v1/environments/{id}/archiveArchiveEnvironmentData
DELETE/v1/environments/{id}DeleteEnvironmentData
GET/v1/environments/{id}/workGetEnvironmentData
GET/v1/environments/{id}/work/pollProcessEnvironmentWorkData
GET/v1/environments/{id}/work/{work_id}GetEnvironmentData
GET/v1/environments/{id}/work/statsGetEnvironmentData
POST/v1/environments/{id}/work/{work_id}ProcessEnvironmentWorkData
POST/v1/environments/{id}/work/{work_id}/ackProcessEnvironmentWorkData
POST/v1/environments/{id}/work/{work_id}/heartbeatProcessEnvironmentWorkData
POST/v1/environments/{id}/work/{work_id}/stopProcessEnvironmentWorkData
POST/v1/vaultsCreateVaultManagement
GET/v1/vaultsListVaultsManagement
GET/v1/vaults/{id}GetVaultManagement
POST/v1/vaults/{id}UpdateVaultManagement
POST/v1/vaults/{id}/archiveArchiveVaultManagement
DELETE/v1/vaults/{id}DeleteVaultManagement
GET/v1/vaults/{id}/credentialsGetVaultManagement
POST/v1/vaults/{id}/credentialsUpdateVaultManagement
GET/v1/vaults/{id}/credentials/{id}GetVaultManagement
POST/v1/vaults/{id}/credentials/{id}UpdateVaultManagement
POST/v1/vaults/{id}/credentials/{id}/archiveUpdateVaultManagement
DELETE/v1/vaults/{id}/credentials/{id}UpdateVaultManagement
POST/v1/memory_storesCreateMemoryStoreData
GET/v1/memory_storesListMemoryStoresData
GET/v1/memory_stores/{id}GetMemoryStoreData
POST/v1/memory_stores/{id}UpdateMemoryStoreData
POST/v1/memory_stores/{id}/archiveArchiveMemoryStoreData
DELETE/v1/memory_stores/{id}DeleteMemoryStoreData
POST/v1/memory_stores/{id}/memoriesUpdateMemoryStoreData
GET/v1/memory_stores/{id}/memoriesGetMemoryStoreData
GET/v1/memory_stores/{id}/memories/{id}GetMemoryStoreData
POST/v1/memory_stores/{id}/memories/{id}UpdateMemoryStoreData
DELETE/v1/memory_stores/{id}/memories/{id}UpdateMemoryStoreData
GET/v1/memory_stores/{id}/memory_versionsGetMemoryStoreData
GET/v1/memory_stores/{id}/memory_versions/{id}GetMemoryStoreData
POST/v1/memory_stores/{id}/memory_versions/{id}/redactUpdateMemoryStoreData
GET/v1/webhooksListWebhooksManagement
GET/v1/webhooks/{id}GetWebhookManagement
POST/v1/webhooksCreateWebhookManagement
POST/v1/webhooks/{id}UpdateWebhookManagement
DELETE/v1/webhooks/{id}DeleteWebhookManagement
POST/v1/webhooks/{id}/regenerate_signing_secretRotateWebhookSecretManagement

不在此表中的路由在 Claude Platform on AWS 上不可用。网关默认拒绝此处未列出的任何路由。

托管策略

AWS 为 Claude Platform on AWS 提供五个托管策略。所有托管策略均应用于 Resource: "*"。

策略授予
AnthropicFullAccessaws-external-anthropic:*
AnthropicReadOnlyAccessGet*、List*、CallWithBearerToken
AnthropicInferenceAccessGet*、List*、CreateInference、CreateBatchInference、CancelBatchInference、DeleteBatchInference、CountTokens、CallWithBearerToken
AnthropicLimitedAccess所有 AnthropicInferenceAccess 操作,加上所有 Claude Managed Agents 操作(代理、会话、环境、保管库、记忆存储、webhook 以及自托管环境工作)
AnthropicSelfHostedEnvironmentAccessGetEnvironment、ProcessEnvironmentWork、GetSession、UpdateSession、GetSkill、CallWithBearerToken

AnthropicInferenceAccess 是足以运行推理的最窄托管策略。它涵盖同步推理和批量推理,并通过 Get* 和 List* 通配符授予对命名空间中每个 API 资源的读取访问权限,包括 Claude Managed Agents(CMA)资源(代理、会话、环境、保管库、记忆存储和 webhook)。这包括通过 GetFile 下载文件内容(请参阅文件注释)、通过 GetSkill 下载技能内容(请参阅技能注释)以及通过 GetMemoryStore 读取记忆内容。保管库凭证密钥和 webhook 签名密钥不会被暴露:这些字段为只写字段,GetVault 或 GetWebhook 永远不会返回它们(请参阅使用保管库进行身份验证)。AnthropicInferenceAccess 不授予文件创建或删除、技能管理、用户配置文件管理、工作区变更、加密密钥管理、遥测目标管理或任何 Claude Managed Agents 写入操作(创建、更新、归档、删除、处理或轮换)。若要排除 CMA 读取权限,请将 AnthropicInferenceAccess 替换为仅枚举您所需的特定非 CMA 操作的自定义策略。

AnthropicLimitedAccess 除推理操作外,还包含所有 Claude Managed Agents 操作。

AnthropicSelfHostedEnvironmentAccess 是足以运行自托管沙箱工作进程的最窄托管策略。请将其附加到您的环境工作进程进行身份验证时所使用的主体。

AssumeConsole 不包含在 AnthropicReadOnlyAccess、AnthropicInferenceAccess、AnthropicLimitedAccess 或 AnthropicSelfHostedEnvironmentAccess 中。需要 Claude Console 访问权限的主体需要 AnthropicFullAccess 或授予 aws-external-anthropic:AssumeConsole 的自定义策略。请参阅控制台访问。

示例策略

在单个工作区上进行同步推理

为针对一个生产工作区运行推理的 IAM 主体授予最小权限:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "aws-external-anthropic:CreateInference",
        "aws-external-anthropic:CountTokens",
        "aws-external-anthropic:GetModel",
        "aws-external-anthropic:ListModels",
        "aws-external-anthropic:GetWorkspace"
      ],
      "Resource": "arn:aws:aws-external-anthropic:us-west-2:123456789012:workspace/wrkspc_01AbCdEf23GhIj"
    }
  ]
}

按客户隔离工作区

将角色限制在单个工作区:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "aws-external-anthropic:*",
      "Resource": "arn:aws:aws-external-anthropic:us-west-2:123456789012:workspace/wrkspc_01AbCdEf23GhIj"
    },
    {
      "Effect": "Allow",
      "Action": [
        "aws-external-anthropic:CallWithBearerToken",
        "aws-external-anthropic:AssumeConsole"
      ],
      "Resource": "*"
    }
  ]
}

针对 ZDR 敏感工作区的功能锁定

在特定工作区上阻止批处理和文件上传,同时保留同步推理可用。当工作区处理不得在服务器端持久化的零数据保留(ZDR)数据时非常有用。请将此策略与 Allow 策略(例如 AnthropicInferenceAccess 或单工作区示例)一起附加;仅包含 Deny 的策略本身不授予任何权限:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": [
        "aws-external-anthropic:CreateBatchInference",
        "aws-external-anthropic:CreateFile"
      ],
      "Resource": "arn:aws:aws-external-anthropic:us-west-2:123456789012:workspace/wrkspc_01AbCdEf23GhIj"
    }
  ]
}

配置自动化

授予 CI/CD 角色创建和管理工作区所需的操作权限,而不包含任何推理权限:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "aws-external-anthropic:CreateWorkspace",
        "aws-external-anthropic:GetWorkspace",
        "aws-external-anthropic:ListWorkspaces",
        "aws-external-anthropic:UpdateWorkspace",
        "aws-external-anthropic:ArchiveWorkspace"
      ],
      "Resource": "*"
    }
  ]
}

CreateWorkspace 和 ListWorkspaces 是账户范围的操作。在这些操作上指定工作区 ARN 不会产生任何效果;请使用 Resource: "*"。

另请参阅

Was this page helpful?