claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

How to configure the Amazon Bedrock Guardrails and Endpoint URL in the Claude-code

Open Sanjaya-005 opened this issue 6 months ago • 0 comments

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?

Sanjaya-005 avatar Jun 09 '25 07:06 Sanjaya-005