Skip to content

claude tries to access models it doesn't have permission to use and returns 403 #377

@nd-kurnal

Description

@nd-kurnal

Describe the bug

[log_4dad79] sending request {
  method: 'post',
  url: 'https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-haiku-20241022-v1:0/invoke-with-response-stream',
  options: {
    method: 'post',
    path: '/model/us.anthropic.claude-3-5-haiku-20241022-v1:0/invoke-with-response-stream',
    body: {
      model: undefined,
      max_tokens: 512,
      messages: [Array],
      system: [Array],
      temperature: 0,
      metadata: [Object],
      stream: undefined,
      anthropic_version: 'bedrock-2023-05-31'
    },
    timeout: 60000,
    signal: AbortSignal { aborted: false },
    stream: true,
    __streamClass: [class vy1 extends AX]
  },
  headers: {
    accept: 'application/json',
    'anthropic-dangerous-direct-browser-access': 'true',
    'anthropic-version': '2023-06-01',
    authorization: '***',
    'content-type': 'application/json',
    host: 'bedrock-runtime.us-east-1.amazonaws.com',
    'user-agent': 'claude-cli/1.0.64 (external, cli)',
    'x-amz-content-sha256': 'be2ab127339f118019ee98806815e2cb78d988841098a772b0d90e0efdd20fce',
    'x-amz-date': '20250731T212734Z',
    'x-amz-security-token': '***',
    'x-api-key': '***',
    'x-app': 'cli',
    'x-stainless-arch': 'x64',
    'x-stainless-helper-method': 'stream',
    'x-stainless-lang': 'js',
    'x-stainless-os': 'Linux',
    'x-stainless-package-version': '0.55.1',
    'x-stainless-retry-count': '0',
    'x-stainless-runtime': 'node',
    'x-stainless-runtime-version': 'v20.10.0',
    'x-stainless-timeout': '60'
  }
}
[log_4dad79] post https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-haiku-20241022-v1:0/invoke-with-response-stream failed with status 403 in 103ms - error; not retryable
[log_4dad79] response error (error; not retryable) {
  url: 'https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-haiku-20241022-v1:0/invoke-with-response-stream',
  status: 403,
  headers: {
    connection: 'keep-alive',
    'content-length': '368',
    'content-type': 'application/json',
    date: 'Thu, 31 Jul 2025 21:27:34 GMT',
    'x-amzn-errortype': 'AccessDeniedException:http://internal.amazon.com/coral/com.amazon.coral.service/',
    'x-amzn-requestid': '46945303-d8b3-40cb-ad68-58cfbd39b9de'
  },
  message: undefined,
  durationMs: 104
}

To Reproduce
This is happening in all Claude workflows I run on my PRs.

Expected behavior
A 403 should never happen and claude should only use models it has permission to use.

Screenshots
If applicable, add screenshots to help explain your problem.

Workflow yml file
If it's not sensitive, consider including a paste of your full Claude workflow.yml file.

API Provider

[ ] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions