> ## Documentation Index
> Fetch the complete documentation index at: https://codinitdev-mintlify-update-changelog-codinit-dev-90028.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock

> How to connect AWS Bedrock AI to CodinIT

Use AWS Bedrock to access powerful AI models like Claude through Amazon's cloud service.

**Website:** [AWS Bedrock Docs](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)

## How to Set It Up

### Step 1: Get Your API Key

1. **Log in:** Go to [AWS Console](https://aws.amazon.com/console)
2. **Open Bedrock:** Visit [Bedrock Console](https://console.aws.amazon.com/bedrock)
3. **Make an API Key:** Create a new Long Lived API Key
   * Use the default setting: `AmazonBedrockLimitedAccess`
   * [See what this allows](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html#managed-policies)

### Step 2: Set Permissions

**You need these permissions:**

```json theme={null}
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": [
      "bedrock:InvokeModel",
      "bedrock:InvokeModelWithResponseStream",
      "bedrock:CallWithBearerToken"
    ],
    "Resource": "*"
  }]
}
```

Create this policy and attach it to your API key user.

**Important notes:**

* To see model lists in CodinIT, add `bedrock:ListFoundationModels` permission
* For Claude models, use `AmazonBedrockLimitedAccess` policy
* For Anthropic models, fill out the First Time Use form in the [Playground](https://console.aws.amazon.com/bedrock/home#/text-generation-playground)

### Step 3: Pick a Region

Choose where the AI runs (closer = faster):

* `us-east-1` (Virginia, USA)
* `us-west-2` (Oregon, USA)
* `eu-west-1` (Ireland, Europe)
* `ap-southeast-1` (Singapore, Asia)

**Note:** Some models need [Cross Region Inference](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html) - check that box if needed.

### Step 4: Connect to CodinIT

1. Install CodinIT in VS Code
2. Click the settings icon (⚙️)
3. Choose **AWS Bedrock** as your AI provider
4. Enter your **API Key**
5. Type your **AWS Region** (like `us-east-1`)
6. Pick a **Model** (like `anthropic.claude-3-5-sonnet-20241022-v2:0`)
7. Save and test it

## Staying Safe

1. **Use secure login:** Use AWS SSO instead of API keys when you can
2. **Network safety:** Consider using [AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-overview.html)
3. **Watch activity:** Turn on CloudTrail to see what's happening
4. **Control costs:** Use AWS Cost Explorer and set up billing alerts
5. **Check regularly:** Review your settings and logs often

## Good to Know

* **Cost:** You pay for what you use - see [AWS Bedrock Pricing](https://aws.amazon.com/bedrock/pricing/)
* **Security:** Meets HIPAA and SOC 2 Type II standards
* **Help:** [AWS Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)
* **Best practices:** [AWS IAM Best Practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
