Claude Code on the web: agent proxy decodes `%2F` in request paths, breaking AWS Bedrock
What happened
Claude Code projects: agent proxy decodes %2F in request paths, breaking Amazon Bedrock application inference profiles
Setup. Cloud environment with an API credential (type Bearer, header Authorization) for bedrock-runtime.eu-central-1.amazonaws.com and bedrock.eu-central-1.amazonaws.com. The credential injection works: AWS identifies the caller as the expected IAM user.
Problem. Bedrock application inference profiles can only be addressed by their ARN, which contains a slash, so the model ID in the path must be URL-encoded:
POST https://bedrock-runtime.eu-central-1.amazonaws.com/model/arn%3Aaws%3Abedrock%3Aeu-central-1%3A<account>%3Aapplication-inference-profile%2F<id>/converse
Through the proxy, this returns 200 {"Output":{"__type":"com.amazon.coral.service#UnknownOperationException"},"Version":"1.0"}. The same happens for GET https://bedrock.eu-central-1.amazonaws.com/inference-profiles/<encoded ARN> (404 <UnknownOperationException/>). The same request works outside the proxy. It looks like the proxy decodes %2F to / before forwarding, so AWS receives a path with an extra segment.
Checked:
- Same result with
curl --path-as-isand with Node 22fetch, so it isn't client-side normalisation. - Lowercase
%2f: same result. - Double-encoded
%252F: the proxy rejects it with403 request rejected: path contains encoded separator. - IDs without a slash (for example
eu.anthropic.claude-haiku-5-5) reach Bedrock normally (a regular IAM 403 for our user), so routing and credential injection are fine. - Bedrock's OpenAI-compatible endpoint (model in the body) does not accept application inference profiles, so there is no workaround on our side.
Expected. The proxy forwards the path bytes unchanged, or at least preserves encoded %2F, as the AWS SDKs and other HTTP clients do.
Impact. Any Bedrock setup restricted to application inference profiles (common for cost allocation and IAM scoping) cannot make model
Environment
- Filed from: Report a problem in Claude Code
- Project ID:
chan_01KFd6PWSUjFpznd6uuzLX61
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗