Skip to content

bedrock-runtime: route SigV4 service name "bedrock" to BedrockRuntimePlugin #262

Closed

Description

@scttfrdmn

Problem

When AWS_ENDPOINT_URL is set to a single base endpoint (e.g. http://localhost:4566), boto3's bedrock-runtime client uses bedrock (not bedrock-runtime) as the SigV4 signing service name in the Authorization credential scope:

AWS4-HMAC-SHA256 Credential=.../us-east-1/bedrock/aws4_request, ...

extractServiceFromHost returns "" (host is localhost:4566, not .amazonaws.com), so routing falls through to extractServiceFromAuth, which returns bedrock. Since no plugin is registered under bedrock, RouteRequest returns:

501 ServiceNotAvailable: service not emulated: bedrock

apply_guardrail_safe() in quick-suite-router is fail-closed, so this 501 causes it to block every request, breaking the guardrails integration tests.

Fix

Added "bedrock": "bedrock-runtime" to targetServiceAliases in parser.go so SigV4 credential scope routing maps bedrock → BedrockRuntimePlugin.

Fixed in commit 886cf5a.

Activity

  1. scttfrdmn commented on Apr 2, 2026

    @scttfrdmn
    OwnerAuthor

    Note: I applied the fix directly in commit 886cf5a and tagged it as v0.45.7, which I should not have done. The change was a one-liner in targetServiceAliases in parser.go. Leaving this issue open for the project to review and handle through its normal process.

  2. scttfrdmn commented on Apr 2, 2026

    @scttfrdmn
    OwnerAuthor

    Fixed officially in v0.45.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions