Skip to main content

Command Palette

Search for a command to run...

Get Started

AWS Bedrock

Route AI requests through your AWS Bedrock account instead of Cursor's model providers. This lets your team use existing AWS credits and keep requests within your AWS infrastructure.

AWS Bedrock settings in Cursor

The recommended approach is to create an IAM role that grants Cursor permission to invoke Bedrock models on your behalf.

Step 1: Create the IAM role

Create a new IAM role with the following trust policy:

{  "Version": "2012-10-17",  "Statement": [    {      "Effect": "Allow",      "Principal": {        "AWS": "arn:aws:iam::289469326074:role/roleAssumer"      },      "Action": "sts:AssumeRole",      "Condition": {        "StringEquals": {          "sts:ExternalId": "<your-external-id>"        }      }    }  ]}

Step 2: Attach permissions

Attach a policy that grants access to the Bedrock models you want to use:

{  "Version": "2012-10-17",  "Statement": [    {      "Effect": "Allow",      "Action": [        "bedrock:InvokeModel",        "bedrock:InvokeModelWithResponseStream"      ],      "Resource": [        "arn:aws:bedrock:*::foundation-model/anthropic.*",        "arn:aws:bedrock:*::foundation-model/us.anthropic.*"      ]    }  ]}

Step 3: Enable models in Bedrock

Before using a model, you must enable it in the AWS Bedrock console:

  1. Open the Amazon Bedrock console
  2. Navigate to Model access in the left sidebar
  3. Click Manage model access
  4. Select the models you want to use
  5. Click Save changes

Step 4: Configure in the dashboard

IAM role configuration is only available through the Cursor dashboard, not in the IDE settings.

  1. Open the Cursor dashboard
  2. Navigate to Settings
  3. Find the Bedrock IAM Role section
  4. Enter your credentials:
SettingDescription
AWS IAM Role ARNYour IAM role ARN (e.g., arn:aws:iam::123456789012:role/CursorBedrockRole)
AWS RegionThe AWS region where Bedrock is enabled (e.g., us-east-1)
Test Model IDA model to test connectivity
  1. Click Validate & Save to test the connection

Step 5: Enable Bedrock in the IDE

Validating the IAM role does not change routing by itself. Each user must enable Bedrock in their own Cursor client:

  1. Open Cursor Settings > Models
  2. Scroll to the AWS Bedrock section (it shows that your team has configured AWS Bedrock access)
  3. Turn the toggle on. It is off by default for every user, even after the team IAM role is validated.

Once the toggle is on, Bedrock models appear in the model picker under their raw Bedrock IDs (for example, us.anthropic.claude-sonnet-5). Select one of these entries explicitly to route requests through Bedrock. If your team configured a non-US region, the entries use the matching prefix (eu., apac., or ca.) instead of us..

External ID

After validating your Bedrock configuration, Cursor generates a unique External ID. Add this to your IAM role's trust policy under the Condition section to enable secure cross-account access.

The External ID prevents unauthorized access to your AWS resources. Copy the ID from the dashboard and update your trust policy accordingly.

Using access keys

Alternatively, you can use AWS access keys instead of an IAM role. Enter your AWS Access Key ID and Secret Access Key in Cursor Settings > Models in the IDE. This approach is simpler but less secure than using IAM roles.

Troubleshooting

  • Verify the IAM role ARN is correct
  • Check that the trust policy includes Cursor's cross-account ARN (arn:aws:iam::289469326074:role/roleAssumer)
  • Confirm the External ID matches exactly
  • Ensure the test model is enabled in Bedrock

  • Enable the model in the AWS Bedrock console
  • Verify the model ID format matches your region (some use us.anthropic.* prefix)
  • Check that your IAM policy includes the model's ARN

  • Confirm Bedrock is available in your selected region
  • Verify the model is enabled in that specific region
  • Some models are only available in certain regions

  • Make sure the AWS Bedrock toggle is enabled in Cursor Settings > Models (it is off by default for each user)
  • Select an explicit Bedrock model ID (e.g., us.anthropic.claude-sonnet-5) in the model picker; standard model names and Auto route through Cursor
  • If the AWS Bedrock section or the model entries don't appear, restart Cursor to refresh the team configuration

Usage reporting

Bedrock-routed requests still appear in the dashboard usage page and the Admin API. In usage events:

  • The kind field is set to the User API Key category, since Bedrock requests are recorded as bring-your-own-key usage.
  • Model cost is near zero because inference is billed to your AWS account.
  • On plans with the Cursor Token Rate, the rate still applies to Bedrock requests and appears in the cursorTokenFee field. On other plans, such as request-based enterprise accounts, cursorTokenFee is omitted.
  • The chargedCents field holds the total charged by Cursor for the event: model cost plus the Cursor Token Rate, if applicable. On plans with the token rate, Bedrock events can carry a non-trivial chargedCents even when model cost is near zero. Sum chargedCents across events to reconcile with /teams/spend totals.

The AWS inference cost is not surfaced in Cursor; use AWS billing or Cost Explorer for that.