---
title: "AWS Bedrock: Enterprise AI with Claude, Llama, and Amazon Nova in Pixeltable"
date: "2025-09-25"
author: "Pixeltable Team"
tags:
  - AWS Bedrock
  - Claude
  - Amazon Nova
  - Llama
  - Enterprise AI
  - AI Agents
  - AI Integration
  - Pixeltable
description: "Build enterprise-grade AI applications using AWS Bedrock's managed foundation models. Learn how to integrate Claude Sonnet, Amazon Nova, Llama, and build tool-based agents with Pixeltable's declarative infrastructure."
url: "https://pixeltable.com/blog/aws-bedrock-enterprise-ai-pixeltable"
---

# AWS Bedrock: Enterprise AI with Claude, Llama, and Amazon Nova in Pixeltable

AWS Bedrock provides enterprise-grade access to foundation models from Anthropic, Meta, Amazon, and others through a unified API. Combined with Pixeltable, you can build secure, scalable AI applications that leverage your existing AWS infrastructure and security posture.

 
## AWS Bedrock: Enterprise Foundation Models

 
**AWS Bedrock** is Amazon's fully managed service for accessing foundation models. It offers unique advantages for enterprises already invested in AWS:

 
 

 - **Unified Access:** Multiple model providers through a single API

 - **Enterprise Security:** VPC endpoints, IAM integration, data encryption

 - **Compliance:** HIPAA, SOC, GDPR-ready infrastructure

 - **No Data Training:** Your data is never used to train models

 

 
 
When combined with Pixeltable's [declarative infrastructure](/blog/unified-multimodal-ai-infrastructure-pixeltable), you get the best of AWS security with powerful data orchestration, [incremental processing](/blog/incremental-embedding-indexes), and [complete lineage tracking](/blog/pixeltable-versioning-time-travel).

 
## Available Models

 
 
### Anthropic Claude (via Bedrock)

 

 - **Claude 3.5 Sonnet:** Best balance of intelligence and speed

 - **Claude 3 Opus:** Most capable for complex reasoning

 - **Claude 3 Haiku:** Fast and cost-effective

 

 
### Amazon Nova

 

 - **Amazon Nova Pro:** High-performance multimodal model

 - **Amazon Nova Lite:** Cost-effective for simpler tasks

 - **Amazon Nova Micro:** Ultra-fast text generation

 

 
### Meta Llama

 

 - **Llama 3.2:** Latest open-weight model with multimodal support

 - **Llama 3.1 405B:** Largest open model available

 

 
## Getting Started

 
 
### Prerequisites

 

 - Activate Bedrock in your AWS account

 - Request access to your desired models (e.g., Claude Sonnet 3.5, Amazon Nova Pro)

 - Configure AWS credentials

 

 
```bash
# Install required packages
pip install pixeltable boto3

# Configure AWS credentials (if not already done)
aws configure

# Or set environment variables
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-east-1"
```

 
## Basic Chat with Bedrock

 
Using Amazon Nova Pro for chat completions:

 
```python
import pixeltable as pxt
from pixeltable.functions import bedrock

# Create workspace
pxt.drop_dir('bedrock_demo', force=True)
pxt.create_dir('bedrock_demo')

# Create a chat table
t = pxt.create_table('bedrock_demo.chat', {'input': pxt.String})

# Add Bedrock-powered responses
t.add_computed_column(output=bedrock.converse(
 model_id="amazon.nova-pro-v1:0",
 messages=[{
 'role': 'user',
 'content': [{'text': t.input}]
 }]
))

# Extract response text
t.add_computed_column(response=t.output.output.message.content[0].text)

# Test with a query
t.insert([{'input': 'What was the outcome of the 1904 US Presidential election?'}])
t.select(t.input, t.response).show()
```

 
## Building Tool-Based Agents

 
Bedrock supports tool/function calling for building sophisticated agents:

 
```python
import pixeltable as pxt
import pixeltable.functions as pxtf
from pixeltable.functions.bedrock import converse, invoke_tools
from duckduckgo_search import DDGS

# Initialize
pxt.drop_dir("agents", force=True)
pxt.create_dir("agents")

# Define tools as Pixeltable UDFs
@pxt.udf
def search_news(keywords: str, max_results: int) -> str:
 """Search news using DuckDuckGo and return results."""
 try:
 with DDGS() as ddgs:
 results = ddgs.news(
 keywords=keywords,
 region="wt-wt",
 safesearch="off",
 timelimit="m",
 max_results=max_results,
 )
 formatted = []
 for i, r in enumerate(results, 1):
 formatted.append(f"{i}. {r['title']} ({r['source']})")
 return chr(10).join(formatted)
 except Exception as e:
 return f"Search failed: {str(e)}"

@pxt.udf
def get_weather(location: str) -> str:
 """Get weather for a location (mock - replace with real API)."""
 return f"Current weather in {location}: 72F, Partly Cloudy"

# Register tools
tools = pxt.tools(search_news, get_weather)

# Create agent table
tool_agent = pxt.create_table("agents.tools", {"prompt": pxt.String})

# Step 1: Initial response with tool selection
tool_agent.add_computed_column(
 initial_response=converse(
 model_id="amazon.nova-pro-v1:0",
 messages=[{
 'role': 'user',
 'content': [{'text': tool_agent.prompt}]
 }],
 tool_config=tools,
 )
)

# Step 2: Execute selected tools
tool_agent.add_computed_column(
 tool_output=invoke_tools(tools, tool_agent.initial_response)
)

# Step 3: Generate final response with tool results
tool_agent.add_computed_column(
 final_response=converse(
 model_id="amazon.nova-pro-v1:0",
 messages=[{
 'role': 'user',
 'content': [{'text': pxtf.string.format(
 "Original: {0} - Tool Output: {1}",
 tool_agent.prompt,
 tool_agent.tool_output
 )}]
 }]
 )
)

# Extract answer
tool_agent.add_computed_column(
 answer=tool_agent.final_response.output.message.content[0].text
)

# Test the agent
tool_agent.insert([
 {'prompt': "What's the latest news about SpaceX?"},
 {'prompt': "What's the weather in San Francisco?"}
])

tool_agent.select(tool_agent.prompt, tool_agent.answer).show()
```

 
## Using Claude via Bedrock

 
Access Anthropic's Claude models with AWS security:

 
```python
import pixeltable as pxt
from pixeltable.functions import bedrock
import pixeltable.functions as pxtf

# Create Claude-powered analysis
analysis = pxt.create_table('bedrock_demo.claude_analysis', {
 'document': pxt.String,
 'analysis_type': pxt.String
})

# Use Claude 3.5 Sonnet via Bedrock
analysis.add_computed_column(
 result=bedrock.converse(
 model_id="anthropic.claude-3-5-sonnet-20241022-v2:0",
 messages=[{
 'role': 'user',
 'content': [{
 'text': pxtf.string.format(
 'Perform a {} analysis on this document: {}',
 analysis.analysis_type,
 analysis.document
 )
 }]
 }]
 )
)

analysis.add_computed_column(
 output=analysis.result.output.message.content[0].text
)

# Analyze documents
analysis.insert([
 {'document': 'Our Q4 revenue increased by 25% YoY...', 'analysis_type': 'financial'},
 {'document': 'The new product launch exceeded expectations...', 'analysis_type': 'sentiment'}
])

analysis.select(analysis.analysis_type, analysis.output).show()
```

 
## Bedrock Model Comparison

 
| Model | Best For | Context | Cost Tier |
| --- | --- | --- | --- |
| Claude 3.5 Sonnet | Complex reasoning, coding | 200K | $$ |
| Claude 3 Haiku | Fast, simple tasks | 200K | $ |
| Amazon Nova Pro | Multimodal, general purpose | 300K | $$ |
| Amazon Nova Lite | Cost-effective batch | 300K | $ |
| Llama 3.2 90B | Open-weight alternative | 128K | $$ |

 
## Bedrock vs Direct APIs

 
| Consideration | AWS Bedrock | Direct Provider APIs |
| --- | --- | --- |
| Security | AWS IAM, VPC, encryption | Varies by provider |
| Compliance | HIPAA, SOC, FedRAMP | Provider-dependent |
| Billing | Consolidated AWS billing | Multiple accounts |
| Multi-Provider | Single API | Different SDKs |
| Latest Models | Slight delay | Day-one access |

 
## Best Practices

 
### Cost Management

 

 - **Use provisioned throughput:** For predictable workloads

 - **Choose appropriate models:** Nova Lite for simple tasks, Sonnet for complex

 - **Leverage Pixeltable caching:** Automatic result caching reduces API calls

 - **Monitor with CloudWatch:** Track usage and costs

 

 
### Error Handling

 

 - **Throttling:** Pixeltable's [rate limiting](/blog/rate-limiting) handles this

 - **Model access:** Ensure models are enabled in your region

 - **Quota limits:** Request increases for production workloads

 

 
## Next Steps

 
You've learned how to build enterprise AI applications with AWS Bedrock and Pixeltable. Explore more:

 

 - **Build AI Agents:** [Agent Development Guide](/blog/practical-guide-building-agents)

 - **Compare Providers:** [Multi-Provider Strategy](/blog/multi-provider-ai-strategy-comparison-guide)

 - **Production RAG:** [RAG Best Practices](/blog/production-rag-data-centric)

 - **All Integrations:** [Ecosystem Overview](https://docs.pixeltable.com/integrations/frameworks)

 

 
## Resources

 

 - [Pixeltable Bedrock Documentation](https://docs.pixeltable.com/howto/providers/working-with-bedrock)

 - [AWS Bedrock Documentation](https://docs.aws.amazon.com/bedrock/)

 - [Pixeltable GitHub Repository](https://github.com/pixeltable/pixeltable)

 - [Join our Discord Community](https://discord.com/invite/QPyqFYx2UN)