How to Set Up OpenClaw with AWS Bedrock
Amazon Bedrock handles model inference, IAM authentication, and automatic model discovery for OpenClaw, removing the need to manage API keys or provision GPU instances. This guide walks through two deployment paths, a one-click Lightsail blueprint and an EC2 stack via CloudFormation, then covers all three authentication methods, automatic model discovery, Guardrails content filtering, service tiers, and embeddings configuration.
Why Bedrock Changes the OpenClaw Deployment Model
Tokens processed on Amazon Bedrock during Q1 2026 exceeded the total volume from all previous years combined, according to AWS's AI/ML marketing lead Bharat Sandhu at the "What's Next with AWS?" conference. That growth reflects a shift from self-managed inference to managed platforms, and OpenClaw sits squarely in that trend.
OpenClaw connects to Bedrock through its built-in Amazon Bedrock provider. Instead of managing API keys from individual model vendors, you authenticate through AWS IAM. Instead of provisioning GPUs or picking inference endpoints, Bedrock handles model hosting and scaling. OpenClaw's automatic model discovery scans your account for every streaming-compatible model and presents them as selectable options, so you configure credentials once and get access to the full catalog.
The practical result: set AWS credentials, point OpenClaw at Bedrock, and you get access to 10 or more models without configuring each one individually. The current list includes Claude Sonnet 4.6 (the Lightsail default), Claude Opus 4.6, Claude Opus 4.5, Claude Haiku 4.5, Amazon Nova 2 Lite, Nova Pro, DeepSeek R1, Llama 3.3 70B, and Kimi K2.5.
OpenClaw resolves credentials through the standard AWS SDK chain. Set your preferred AWS credentials (access keys, instance role, or named profile), and the Bedrock provider activates automatically once valid credentials are detected.
AWS provides several deployment paths. The simplest is the Lightsail blueprint, a pre-configured instance with Bedrock enabled out of the box. For more control over networking, security groups, and monitoring, an EC2-based CloudFormation stack published by AWS deploys OpenClaw with IAM roles and optional WAF protection. A third path, AgentCore with CDK, targets multi-tenant deployments with isolated compute per user and S3-backed persistence.
This guide covers Lightsail and EC2 in detail, then walks through authentication, model discovery, Guardrails, service tiers, and embeddings.
How to Deploy OpenClaw on Lightsail
The Lightsail blueprint is the fast way to get OpenClaw running on Bedrock. AWS ships a pre-configured image with Bedrock enabled as the default model provider. The AWS blog post and Lightsail's built-in Getting Started tab walk through the full process.
The workflow has three phases: create the instance, pair your browser to the OpenClaw dashboard through an SSH session, and run a CloudShell script that provisions the IAM role for Bedrock access. AWS recommends the 4GB memory plan for responsive agent performance.
The CloudShell script handles the IAM plumbing automatically. It creates an instance-specific role, attaches Bedrock API and Marketplace permissions, and configures the instance profile. Once the script completes, the OpenClaw dashboard is ready to use.
The default model after setup is Claude Sonnet 4.6. If this is your first time using Anthropic models on Bedrock, you need to accept the terms through the Bedrock console's Model catalog. Models from Amazon, Meta, Mistral, DeepSeek, and Qwen skip this step entirely.
Cost structure
You pay the Lightsail hourly instance rate plus Bedrock token pricing per message. Third-party models from AWS Marketplace (like Anthropic's Claude family) may add separate software fees that appear as AWS Marketplace line items on your bill. The Lightsail plan includes a monthly data transfer allowance, and overages are billed separately. Snapshots of your instance (manual or automatic) also incur storage charges based on the amount of data stored.
EC2 Deployment with CloudFormation
For more control over networking, monitoring, and security, AWS publishes a sample CloudFormation stack that deploys OpenClaw on EC2 with Bedrock. The repository also includes alternative paths for EKS via Terraform and macOS instances on Apple Silicon, though the CloudFormation route is the most documented.
The default architecture uses a Graviton-based c7g.large instance (ARM), a VPC with public subnet, EBS storage, and security groups with minimal ingress rules. SSH is disabled by default. You connect through SSM Session Manager instead, which eliminates exposed ports and logs every session.
One-click deploy buttons exist for us-west-2, us-east-1, eu-west-1, and ap-northeast-1. You can also deploy from the CLI:
aws cloudformation create-stack \
--stack-name openclaw-bedrock \
--template-url <template-s3-url> \
--capabilities CAPABILITY_IAM
Key CloudFormation parameters
- OpenClawModel: Select the default model. Nova 2 Lite is the default; Claude variants, DeepSeek R1, and Llama 3.3 70B are available.
- InstanceType: Choose from Graviton ARM or x86 instances. Dropping to
t4g.mediumsaves roughly $28 per month over the default. - CreateVPCEndpoints: Private network routing for Bedrock API calls. Adds approximately $88 per month.
- EnableMonitoring: CloudWatch metrics and alarms. Adds approximately $4 per month.
- EnablePublicAccess: ALB with CloudFront for HTTPS access. Adds approximately $25 per month.
- EnableWAF: Layer 7 DDoS protection, available in
us-east-1only.
The stack grants the EC2 instance an IAM role with Bedrock permissions. All authentication runs through the instance role, with no API keys to rotate or leak.
Default monthly cost is approximately $67
That breaks down to $53 for the EC2 instance, $4.80 for 60GB EBS storage, $4 for CloudWatch basics, and about $5.55 for Bedrock usage at roughly 100 conversations per day on Nova 2 Lite. Switching to Claude models increases the Bedrock portion based on per-token pricing.
The stack also includes automated health checks every five minutes, a 2GB swap file to prevent out-of-memory failures, Docker sandbox isolation for tool execution, IMDSv2 enforcement for instance metadata security, and automatic OS security patches through unattended-upgrades.
Give your Bedrock-powered agents a persistent workspace
Fast.io offers 50GB free storage with built-in semantic search and MCP access. Agents read, write, and share files without managing S3 buckets or access controls. No credit card required.
How to Configure IAM Authentication for Bedrock
OpenClaw uses the AWS SDK default credential chain for Bedrock authentication, not vendor-specific API keys. Three methods work, and you can combine them for different environments.
Access Keys
Set these environment variables on the host running OpenClaw:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY(required pair)AWS_REGION(defaults tous-east-1if unset)AWS_SESSION_TOKEN(optional, for temporary credentials from STS)AWS_PROFILE(optional, to select a named profile from~/.aws/credentials)
OpenClaw detects these variables and enables the Bedrock provider automatically. This method works for local development, CI/CD runners, or any host where you manage credentials directly. It is the simplest path for testing before moving to instance roles.
EC2 Instance Roles
On EC2 instances with an attached IAM role, OpenClaw picks up credentials from the Instance Metadata Service. On manually provisioned instances (not using the Lightsail blueprint or CloudFormation stack), you may need to explicitly enable Bedrock discovery in the OpenClaw settings. The Bedrock provider docs cover the exact configuration. Both the Lightsail blueprint and the CloudFormation stack handle this automatically.
SDK Credential Chain For ECS tasks, Lambda functions, or any environment using the standard AWS SDK resolution order (environment variables, shared credentials file, container credentials, instance profile), OpenClaw follows the same chain without additional configuration. This makes it straightforward to run OpenClaw in containerized environments where credentials are injected through task roles or pod service accounts.
Required IAM Permissions
Whichever auth method you choose, the IAM principal needs these permissions:
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamfor running inferencebedrock:ListFoundationModelsandbedrock:ListInferenceProfilesfor automatic model discoverybedrock:ApplyGuardrailif you enable Guardrails (covered in the next section)
The managed policy AmazonBedrockFullAccess covers all of these. For production deployments, create a scoped custom policy that grants only the permissions listed above, restricted to specific model ARNs where possible. The Lightsail setup script and CloudFormation template both create appropriately scoped roles by default.
Model Discovery, Guardrails, and Service Tiers
Once authentication is in place, OpenClaw unlocks several Bedrock-specific features that go beyond basic model inference.
Automatic Model Discovery
OpenClaw queries the Bedrock API to find every streaming-compatible model in your account and region. Results are cached for one hour by default. Discovery settings let you override the region, filter by model provider, adjust cache duration, and set fallback context window and output token limits. See the Bedrock provider docs for the full list of configuration options.
Both regional and global inference profiles are discovered automatically. Regional profiles route requests within a specific AWS region, while global profiles can route across regions. Both inherit capabilities from their backing foundation models.
Bedrock Guardrails
Guardrails add content filtering, PII detection, and safety controls at the Bedrock API level. Configure them in the OpenClaw settings under the amazon-bedrock plugin:
{
"guardrail": {
"guardrailIdentifier": "your-guardrail-id",
"guardrailVersion": "1",
"streamProcessingMode": "sync",
"trace": "enabled"
}
}
Create the guardrail in the Bedrock console first, then reference its identifier and version in OpenClaw's configuration. The trace option logs which guardrail rules triggered on each request, which helps during initial tuning. This feature requires the bedrock:ApplyGuardrail IAM permission added to your role.
Service Tiers
Bedrock offers four processing tiers that balance cost and latency:
- default: Standard processing with no special configuration needed.
- flex: Lower cost with higher latency. Good for batch agent tasks where response time is not critical.
- priority: Reduced latency for interactive workloads and real-time chat.
- reserved: Pre-purchased capacity for steady, predictable workloads with guaranteed throughput.
Set the tier globally with agents.defaults.params.serviceTier or override it per-model in the provider configuration.
Embeddings for Memory Search
OpenClaw supports Bedrock as an embedding provider for agent memory search. Point it at a supported embedding model in your agent defaults:
{
"memorySearch": {
"provider": "bedrock",
"model": "amazon.titan-embed-text-v2:0"
}
}
Supported embedding models include Amazon Titan Embed, Amazon Nova Embed, Cohere Embed, and TwelveLabs Marengo. This enables semantic retrieval over the agent's conversation history and stored context without running a separate vector database.
Persistent Storage for Agent Output
Running OpenClaw on Bedrock solves model inference but leaves file persistence as a separate problem. Agents generate reports, datasets, code, and media that need to survive beyond a single session. On Lightsail, files live on the instance's EBS volume. On EC2, the CloudFormation stack provides EBS storage with optional CloudWatch monitoring. The AgentCore path syncs workspace files to S3 for persistence across ephemeral containers.
Each approach ties storage to the compute layer. Terminate the instance and non-synced files disappear. Want to share agent output with a client or team member? You need additional infrastructure for access controls, previews, and delivery links.
Local EBS or S3 buckets work for raw file storage. Google Drive and Dropbox add sharing but lack semantic search across agent-generated content. Fast.io provides a workspace layer designed for this handoff pattern. Agents access it through the MCP server at /mcp or through the REST API. Files uploaded to a workspace get automatic semantic indexing when Intelligence Mode is enabled, so you can search agent output by meaning rather than filename.
A common workflow: an OpenClaw agent running on Bedrock processes data, writes results to a Fast.io workspace via MCP, and a human reviewer finds the output through semantic search or a branded share link. The agent can transfer ownership of the entire workspace to a human while keeping admin access for future updates.
For teams running multiple OpenClaw agents on the same AWS infrastructure, file locks prevent conflicts when two agents write to the same workspace simultaneously. Webhooks notify downstream systems when files change, enabling event-driven pipelines that trigger on new agent output. The free agent plan includes 50GB storage, 5,000 monthly credits, and 5 workspaces with no credit card or expiration.
Frequently Asked Questions
How do I connect OpenClaw to AWS Bedrock?
Set your AWS credentials using access keys, an EC2 instance role, or the SDK credential chain. OpenClaw detects credentials automatically and activates the Bedrock provider, which uses the `bedrock-converse-stream` API with `auth: "aws-sdk"`. No model vendor API key is needed. On Lightsail, the blueprint handles configuration out of the box. On EC2, the CloudFormation stack creates an IAM role with the required Bedrock permissions.
Does OpenClaw work with Amazon Lightsail?
Yes. AWS offers a dedicated OpenClaw blueprint in Lightsail that comes pre-configured with Bedrock as the default model provider. Select the blueprint, create a 4GB instance, pair your browser via SSH, and run the provided CloudShell script to grant Bedrock permissions. The default model is Claude Sonnet 4.6, and you can switch to any Bedrock-enabled model from the OpenClaw dashboard.
What models are available through Bedrock in OpenClaw?
OpenClaw automatically discovers all streaming-compatible models in your Bedrock-enabled region. The AWS sample repository lists 10 pre-configured options: Amazon Nova 2 Lite, Amazon Nova Pro, Claude Sonnet 4.5, Claude Opus 4.6, Claude Opus 4.5, Claude Haiku 4.5, Claude Sonnet 4, DeepSeek R1, Llama 3.3 70B, and Kimi K2.5. Additional models become available as you enable them in the Bedrock console's model catalog.
Do I need an API key for OpenClaw with Bedrock?
No. OpenClaw authenticates to Bedrock through the AWS SDK credential chain, which uses IAM roles and policies rather than API keys. On EC2 or Lightsail, the instance's IAM role provides credentials automatically. For local development, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as environment variables. The Bedrock provider activates when it detects valid AWS credentials.
How much does running OpenClaw on AWS Bedrock cost?
Costs depend on the deployment path. The default EC2 CloudFormation stack runs approximately $67 per month: $53 for a c7g.large instance, $4.80 for EBS storage, $4 for CloudWatch, and about $5.55 for Bedrock usage at roughly 100 conversations per day on Nova 2 Lite. Lightsail pricing is based on the instance plan you select (4GB recommended) plus per-token Bedrock charges. Switching to Claude models increases the Bedrock portion of the bill.
What is the difference between Bedrock service tiers in OpenClaw?
OpenClaw supports four Bedrock service tiers. Default provides standard processing. Flex offers lower cost with higher latency, suited for batch agent tasks. Priority reduces latency for interactive sessions and real-time chat. Reserved provides pre-purchased capacity for steady workloads with guaranteed throughput. Configure the tier globally or per model in the OpenClaw provider settings.
Related Resources
Give your Bedrock-powered agents a persistent workspace
Fast.io offers 50GB free storage with built-in semantic search and MCP access. Agents read, write, and share files without managing S3 buckets or access controls. No credit card required.