Repository navigation
v2.2.0 - Bedrock backend rewritten to use AWS SDK
Replaces the raw fetch + manual SigV4 signing implementation with @aws-sdk/client-bedrock-runtime. This fixes "fetch failed" errors in container environments (ECS, AgentCore) where the raw HTTP approach couldn't connect to Bedrock endpoints.
What changed
- Bedrock backend now uses
BedrockRuntimeClientandConverseCommandfrom the official AWS SDK - Removed ~250 lines of manual SigV4 signing, credential resolution, and INI profile parsing
- The SDK's default credential provider chain handles env vars,
~/.aws/credentials, SSO, ECS container credentials, EC2 IMDS, and more — out of the box - Region falls back to
AWS_REGION/AWS_DEFAULT_REGIONenv vars when not set in config
Why
The previous implementation used Node.js fetch directly to call the Bedrock Converse API with hand-rolled SigV4 signatures. This worked locally but failed in container environments due to IPv6 DNS resolution, network routing, and TLS issues that the AWS SDK handles internally.
New dependency
@aws-sdk/client-bedrock-runtime(peer dependency of the AWS SDK v3 ecosystem)