How to configure the Amazon Bedrock Guardrails and Endpoint URL in the Claude-code
Resolved 💬 2 comments Opened Jun 9, 2025 by Sanjaya-005 Closed Jun 10, 2025
I am using application inference profile ARN model configured using the environment variables (access key). Now the model needs to have endpoint url and guardrail set to be able to invoke the model. In the code we do:
bedrock_runtime = boto3.client('bedrock-runtime', region_name="AWS_REGION", endpoint_url=os.getenv("AWS_ENDPOINT"))
# Invoke the model
response = bedrock_runtime.invoke_model(
body=body_bytes,
contentType=payload['contentType'],
accept=payload['accept'],
modelId=payload['modelId'],
guardrailIdentifier=os.getenv("AWS_GUARDRAIL_ID"),
guardrailVersion='1'
)
````
So how can we configure endpoint url and amazon bedrock guardrails while using the claude-code?This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗