- Braintrust CLI (recommended): Requires a single command with AWS credentials
- AWS console: Run the process through the AWS web interface if you need more control or cannot use CLI credentials
Set up the stack
- CLI
- CloudFormation console
1
Install the CLI
Install the latest Braintrust CLI:
2
Create the CloudFormation stack
There are just a few relevant parameters you should consider for most use cases:Once the install completes, you’ll see a log statement likeSave the endpoint URL. You can now skip ahead to the Verifying the stack section.
- A stack name. This is arbitrary and allows you to refer back to the stack later. A name like “braintrust” or “braintrust-dev” should be fine.
--org-nameshould be the name of your organization (you can find this in your URL on the app, e.g.https://www.braintrust.dev/app/<YOUR_ORG_NAME>/...). This will ensure that only users with access to your organization can invoke commands on your Braintrust endpoint.--provisioned-concurrencythe number of lambda workers to keep running in memory. This is useful if you expect to have a lot of concurrent users, or if you want to reduce the cold-start latency of your API calls. Each increment costs about $40/month in AWS costs. The default is 0.--templateif you are deploying in a region other thanus-east-1, you should specify the template for that region.
Verify the stack
Run the following command to test that the stack is running. The first time you run it, AWS may do some setup work to provision your lambda function, and it can take up to 30 seconds to run.{"id":"80c48a10-4888-4382-a55b-255018e70fe5","email":"[email protected]","organizations":[]}.
Configure your organization
Visit your organization’s settings page and set the API URL captured above. You can skip the realtime URL and proxy URL, unless you have an advanced need that requires it (see the docker guide for more information). Once you configure the URL, select Save. The page automatically attempts to test that you’re authorized to access the URL.
The
braintrust install api command tries to install these values for you. So if you see them already filled in, no need to change them!Test the application
Hooray! At this point you should be able to test the full application. The easiest way to do this is by using the Python SDK. This simple Python script will run a full loop of using Braintrust and setting up an experiment. You can specify your API key in theapi_key parameter or set it as the BRAINTRUST_API_KEY environment variable. The SDK will automatically use the API URL you configured in the settings page.
Update the stack
Most new Braintrust releases do not require stack updates. Occasionally, however, you will need to update the stack to get access to new features and performance enhancements. Like installation, you can update the stack through either the CLI or AWS console.- CLI
- AWS console
To update your stack, run the following (replacing You can also use this command to change parameters, with or without template updates. For example, if you
want to allocate provisioned concurrency
<YOUR_STACK_NAME>):8 to your lambda functions, runAdvanced
To permit incoming and outgoing traffic between Braintrust’s lambda functions and other internal cloud resources, you can either run everything in the same VPC or setup VPC peering. This is necessary if you want to access resources like an LLM gateway or a database that is not publicly accessible.VPC Peering
When you create your Braintrust CloudFormation, it automatically creates a VPC with the same name as your CloudFormation. You can access the Braintrust VPC’s name and ID from the CloudFormation’sOutputs tab (named pubPrivateVPCID).

- Create a VPC peering connection
- Accept a VPC peering connection
- View your VPC peering connections
- Update your route tables for a VPC peering connection
- Make sure to update the route tables in both VPCs.
- Update your security groups to reference peer security groups. We recommend allowing “All Traffic” from Braintrust’s VPC.
Troubleshooting
- If you continue to see errors after updating the VPC peering group, you may need to update your CloudFormation template (which will effectively reboot your Lambda functions). You can do this by triggering an update on the CloudFormation and letting it run. You may need to change a stack parameter and then change it back to trigger the updates.
- You can manually test network settings by booting up an EC2 machine in the Braintrust VPC to test connectivity. Make sure to assign a public IP to the instance and use the public subnet of the VPC while initializing.



