Skip to content

Conversation

dbavro19
Copy link
Contributor

@dbavro19 dbavro19 commented Jul 20, 2025

Description

Adds support for custom endpoint URLs in the BedrockModel class to enable connectivity through AWS VPC endpoints (PrivateLink). This feature allows users to specify a custom endpoint URL for organizations that require all Bedrock traffic to flow through VPC endpoints for security and compliance reasons.

Changes Made:

  • Add optional endpoint_url parameter to BedrockModel constructor
  • Pass endpoint_url to boto3 client for VPC endpoint connectivity
  • Update BedrockConfig TypedDict to include endpoint_url field
  • Update constructor docstring to document VPC endpoint usage
  • Maintains backward compatibility with existing code

Usage Example:

from strands.models import BedrockModel

# Using VPC endpoint
model = BedrockModel(
    model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
    endpoint_url="https://vpce-1234567-abcd.bedrock-runtime.us-west-2.vpce.amazonaws.com",
    region_name="us-west-2"
)

Related Issues

Resolves: Issue #496

Documentation PR

Type of Change

New feature

Testing

How have you tested the change?

  • Verified backward compatibility - existing code continues to work unchanged
  • Tested VPC endpoint parameter acceptance and storage in config
  • Confirmed endpoint_url is properly passed to boto3 client
  • Validated BedrockConfig TypedDict includes new parameter
  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly (docstring updates)
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dbavro19 and others added 2 commits August 28, 2025 13:22
…t_url parameter to BedrockModel constructor - Pass endpoint_url to boto3 client for VPC endpoint connectivity - Maintains backward compatibility with existing code Resolves: Issue strands-agents#496
@dbschmigelski dbschmigelski merged commit ae9d5ad into strands-agents:main Aug 29, 2025
13 of 14 checks passed
Ratish1 pushed a commit to Ratish1/sdk-python that referenced this pull request Aug 30, 2025
This was referenced Sep 17, 2025
Unshure pushed a commit to Unshure/sdk-python that referenced this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-provider Related to model providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants