AWS Setup Guide¶
Devo CLI requires AWS credentials to access Bedrock AI models and CodeArtifact. This guide walks you through the setup process.
Prerequisites¶
- AWS account with appropriate permissions
- AWS CLI v2 installed
Quick Setup¶
1. Install AWS CLI¶
If not already installed:
# macOS
brew install awscli
# Linux
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
# Windows
# Download and run: https://awscli.amazonaws.com/AWSCLIV2.msi
Verify installation:
2. Configure AWS SSO (Recommended)¶
For organizations using AWS SSO, use the devo aws-login command:
# Configure SSO profile interactively
devo aws-login configure production
# Login
devo aws-login login production
The command will:
- Prompt for SSO start URL
- Open browser for authentication
- Show available accounts and roles
- Configure default region
See the AWS Login Workflow guide for detailed SSO setup.
3. Alternative: AWS Configure (For IAM Users)¶
If not using SSO:
Enter:
- AWS Access Key ID
- AWS Secret Access Key
- Default region (e.g.,
us-east-1) - Default output format (e.g.,
json)
4. Verify Credentials¶
# Check identity
aws sts get-caller-identity
# Test Bedrock access
aws bedrock list-foundation-models --region us-east-1
Required IAM Permissions¶
Your AWS user/role needs these permissions:
Bedrock Permissions¶
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:*::foundation-model/anthropic.claude-*"
]
}
]
}
CodeArtifact Permissions¶
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codeartifact:GetAuthorizationToken",
"codeartifact:GetRepositoryEndpoint",
"codeartifact:ReadFromRepository"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "sts:GetServiceBearerToken",
"Resource": "*"
}
]
}
Using AWS Profiles¶
If you have multiple AWS accounts or roles, use the devo aws-login command:
# Configure multiple profiles
devo aws-login configure dev
devo aws-login configure staging
devo aws-login configure production
# Check status
devo aws-login list
# Use with Devo CLI
devo --profile production commit
devo --profile staging code-reviewer
# Set default profile
export AWS_PROFILE=production
devo commit
See the AWS Login Workflow guide for managing multiple profiles.
AWS SSO Setup¶
For organizations using AWS SSO, we recommend using the devo aws-login command for simplified authentication:
# Configure SSO profile
devo aws-login configure my-profile
# Login
devo aws-login login my-profile
# Check status
devo aws-login list
# Refresh expired credentials
devo aws-login refresh
For detailed SSO workflows, see the AWS Login Workflow guide.
Manual SSO Configuration (Alternative)¶
If you prefer to use AWS CLI directly:
Bedrock Model Access¶
Enable Bedrock Models¶
- Go to AWS Console → Bedrock
- Navigate to "Model access"
- Request access to Claude models:
- Claude 3.7 Sonnet
- Claude Sonnet 4 (optional)
Available Models¶
Configure your preferred model:
# Claude 3.7 Sonnet (default)
devo config set bedrock.model_id us.anthropic.claude-3-7-sonnet-20250219-v1:0
# Claude Sonnet 4
devo config set bedrock.model_id us.anthropic.claude-sonnet-4-20250514-v1:0
Regional Considerations¶
Bedrock is available in specific regions. Recommended regions:
us-east-1(N. Virginia) - Most models availableus-west-2(Oregon)eu-west-1(Ireland)
Set your region:
Troubleshooting¶
Credentials Not Found¶
# Check AWS configuration
aws configure list
# Verify credentials file
cat ~/.aws/credentials
cat ~/.aws/config
Access Denied to Bedrock¶
- Verify model access in AWS Console
- Check IAM permissions
- Confirm region supports Bedrock
SSO Session Expired¶
Use the devo aws-login command to refresh:
# Refresh specific profile
devo aws-login login my-profile
# Or refresh all profiles
devo aws-login refresh
Wrong Account/Role¶
Security Best Practices¶
- Use IAM Roles: Prefer IAM roles over access keys
- Enable MFA: Require multi-factor authentication
- Rotate Credentials: Regularly rotate access keys
- Use SSO: Prefer AWS SSO over long-term credentials
- Least Privilege: Grant minimum required permissions
- Audit Access: Review CloudTrail logs regularly
Environment Variables¶
Override configuration with environment variables:
# Set region
export AWS_REGION=us-west-2
# Set profile
export AWS_PROFILE=production
# Disable version check
export DEVO_SKIP_VERSION_CHECK=1
Testing Your Setup¶
# Test AWS credentials
aws sts get-caller-identity
# Test Bedrock access
aws bedrock list-foundation-models --region us-east-1
# Test Devo CLI
devo config show
# Generate a commit message (requires staged changes)
git add .
devo commit
Next Steps¶
- AWS Login Workflow - Detailed SSO authentication guide
- Configuration Guide - Detailed configuration options
- Commands - Learn available commands
- Troubleshooting - Common issues