atxtechbro / atxtechbro/dotfiles
feat: add Claude Code AWS Bedrock integration support
- Dominant language
- Shell
- Stars
- 27
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Add support for running Claude Code through AWS Bedrock, enabling enterprise users to leverage corporate AWS accounts with proper IAM controls and cost tracking.
## Requirements
- Configure AWS SSO profiles for Bedrock access
- Set up environment variables for Claude Code Bedrock mode
- Create wrapper scripts for seamless switching between standard and Bedrock modes
- Maintain security by keeping all sensitive values in `.local` files
- Support multiple AWS profiles/environments
- Provide fallback to standard Claude Code when Bedrock unavailable
## Implementation Plan
### 1. AWS Profile Configuration
- Create `aws/config.template` with example SSO profile structure
- Add setup script to configure AWS profiles
- Keep account-specific values in `.local` files
### 2. Environment Management
- Create `.bash_exports.bedrock.template` with required environment variables:
```bash
# Enable Bedrock integration
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
# Model configuration (customize in .local file)
export ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0'
export ANTHROPIC_SMALL_FAST_MODEL='us.anthropic.claude-3-5-haiku-20241022-v1:0'
```
- Source conditionally in `.bashrc` if `.bash_exports.bedrock.local` exists
### 3. Claude Code Integration
- Create `utils/setup-bedrock-claude.sh` script
- Add `claude-bedrock` function/alias that:
- Checks AWS SSO session status
- Sets required environment variables
- Falls back to standard Claude Code if needed
- Update `utils/install-claude-code.sh` to include Bedrock setup
### 4. IAM Policy Template
Create `aws/bedrock-iam-policy.json` template:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:ListInferenceProfiles"
],
"Resource": [
"arn:aws:bedrock:*:*:inference-profile/*",
"arn:aws:bedrock:*:*:application-inference-profile/*"
]
}
]
}
```
### 5. Documentation
- Add Bedrock section to main README.md
- Create `docs/claude-bedrock-setup.md` with:
- Prerequisites (AWS account, Bedrock access, model access)
- Step-by-step setup instructions
- Troubleshooting common issues
- Links to official docs
### 6. Setup Integration
Update `setup.sh` to:
- Check for AWS CLI installation
- Offer to configure Bedrock if AWS CLI present
- Create `.local` template files for user customization
## Success Criteria
- `source setup.sh` detects AWS CLI and offers Bedrock setup
- `claude-bedrock` command works seamlessly with AWS SSO
- Falls back gracefully when Bedrock unavailable
- No sensitive information in tracked files
- Clear documentation for enterprise users
## References
- [Claude Code on Amazon Bedrock docs](https://docs.anthropic.com/en/docs/claude-code/deployment/amazon-bedrock)
- [AWS Bedrock IAM documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html)
Principle: systems-stewardship
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading setup.sh, utils/install-claude-code.sh, and the existing .bashrc and utils conventions before planning the new AWS templates and scripts. Review the referenced Bedrock and IAM documentation, then run the setup flow to verify AWS CLI detection and local-file handling. Done means claude-bedrock supports SSO profiles, fallback behavior, and documented setup without sensitive values in tracked files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, bash, shell
- Domain
- cli, cloud, devops, documentation, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100