A command-line tool to configure Claude Code to use AWS Bedrock as its AI provider. This tool simplifies the process of discovering available Claude models in your AWS account and automatically configures Claude Code with the appropriate settings.
- 🔐 Automatic AWS authentication detection - Verifies your AWS credentials before proceeding
- 🔍 Model discovery - Automatically lists all available Claude models in your AWS Bedrock account
- ⚙️ Simple configuration - Interactive setup wizard guides you through the process
- 🌍 Multi-region support - Works with any AWS region that supports Bedrock
- 🔒 Secure - Credentials are handled by AWS SDK, settings are stored locally
- 🚀 Fast setup - Get up and running in under 30 seconds
- Python 3.10 or higher
- AWS CLI configured with valid credentials
- AWS account with access to Amazon Bedrock
- Claude Code application installed
pip install claude-bedrock-setuppipenv install claude-bedrock-setupgit clone https://github.com/christensen143/claude-bedrock-setup.git
cd claude-bedrock-setup
pip install -e .-
Ensure AWS authentication is configured:
aws configure # or aws sso login --profile your-profile -
Run the setup wizard:
claude-bedrock-setup setup
-
Follow the interactive prompts to select your preferred Claude model
That's it! Claude Code is now configured to use AWS Bedrock.
The easiest way to configure Claude is using the interactive setup wizard:
claude-bedrock-setup setupThis will:
- Verify your AWS authentication
- List available Claude models in your account
- Let you select your preferred model
- Save the configuration for Claude Code
If you prefer to configure specific settings manually:
claude-bedrock-setup configure --model <model-arn> --region us-west-2To view your current configuration:
claude-bedrock-setup statusExample output:
Claude Bedrock Configuration Status
===================================
✅ AWS Authentication: Valid
Account: 123456789012
User: user@example.com
✅ Configuration File: .claude/settings.local.json
Current Settings:
- AWS_REGION: us-west-2
- Model: Claude 3.5 Sonnet v2
- Max Output Tokens: 4096
To reset your configuration:
claude-bedrock-setup resetThe tool creates a .claude/settings.local.json file in your current directory with the following settings:
{
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-west-2",
"ANTHROPIC_MODEL": "arn:aws:bedrock:...",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "4096",
"MAX_THINKING_TOKENS": "1024"
}The tool also automatically updates your .gitignore to exclude the settings file.
claude-bedrock-setup supports all standard AWS authentication methods:
- AWS CLI profiles:
aws configure - AWS SSO:
aws sso login --profile your-profile - Environment variables:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - IAM roles: When running on EC2 or with assumed roles
Your AWS credentials need the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:ListInferenceProfiles",
"bedrock:GetInferenceProfile"
],
"Resource": "*"
}
]
}This usually means your AWS account doesn't have access to Claude models in Bedrock. To fix:
- Log into AWS Console
- Navigate to Amazon Bedrock
- Go to Model Access
- Request access to Anthropic Claude models
- Wait for approval (usually immediate)
- Run
claude-bedrock-setup setupagain
If you're using AWS SSO or assumed roles, ensure your profile is active:
aws sso login --profile your-profile
export AWS_PROFILE=your-profile
claude-bedrock-setup setupSome AWS regions don't support Bedrock. Supported regions include:
- us-east-1 (N. Virginia)
- us-west-2 (Oregon)
- eu-west-1 (Ireland)
- ap-southeast-1 (Singapore)
Use the --region flag to specify a different region:
claude-bedrock-setup setup --region us-east-1git clone https://github.com/christensen143/claude-bedrock-setup.git
cd claude-bedrock-setup
make install-devmake test # Run tests
make test-coverage # Run tests with coverage report
make lint # Run linting
make format # Format code
make check # Run all checksmake build # Build distribution packages
make upload-test # Upload to TestPyPI
make upload # Upload to PyPIContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
make check) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- All tests pass
- Code coverage remains above 95%
- Code follows the project style (run
make format) - Commit messages are clear and descriptive
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Click for the CLI interface
- Uses Rich for beautiful terminal output
- AWS SDK (boto3) for AWS interactions
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: For security issues, please email security@nexusweblabs.com
See CHANGELOG.md for a detailed history of changes.
- Support for multiple configuration profiles
- Configuration templates for different use cases
- Direct integration with Claude Code API
- Support for other AI providers
- Configuration validation and testing
Made with ❤️ by the Claude Setup team