Skip to main content
Upgrading to data plane v2.0? It requires a multi-step migration with irreversible infrastructure changes. Follow the Upgrade to v2.0 guide instead.
This guide shows the routine process for upgrading the Braintrust data plane in your AWS account.
Upgrading from AWS Terraform module v5.x to v6? It requires a two-step apply to move the API from Lambda to ECS. Follow the Upgrade to v6 guide instead.

How it works

On AWS, the Braintrust data plane runs on ECS and EC2 (Terraform module versions before v6.0 run the API on Lambda). The data plane version is bundled into the Terraform module — each module release pins specific versions of the Braintrust API and Brainstore in VERSIONS.json. When you update your module source to a newer version and run terraform apply, Terraform automatically deploys the corresponding data plane.To check which data plane version you’re currently running, go to Settings > Data plane in the Braintrust UI.

1. Update the module version

Check the Self-hosting releases page for your target data plane version to find the minimum Terraform module version required. Then update the ?ref= in your module source:
See all module releases: GitHub Releases
Before you apply, review these version-specific changes. Each row applies when its condition matches your deployment.

2. Review and apply

As of v5.6.0, the modules/services sub-module requires the hashicorp/http provider ~> 3.3. If your .terraform.lock.hcl pins an older 3.x version, run terraform init -upgrade before terraform plan or terraform apply.
Review the planned changes before applying:
If the plan deletes or replaces a database, S3 bucket, or other resource you didn’t expect, don’t apply it. Applying it can cause data loss. Contact Braintrust for help.
Some module versions move resources to new Terraform addresses, so downgrading past them can destroy and recreate those resources. Review the plan before any rollback:
  • v6.8.0: API ECS listener rules, which can disrupt traffic. See the v6.8.0 release notes.
  • v6.9.0: The Loop runtime’s database, Redis, Brainstore, and Gateway ingress rules, if your deployment runs the Loop runtime.
Apply the changes:
This updates both the infrastructure and the data plane components in a single apply.On module v6.9.0 and later, the apply waits for the Brainstore reader and fast reader fleets to finish their instance refreshes before it updates the API ECS services and the API, catchup ETL, automation, and billing Lambda functions, so new API versions don’t serve traffic before Brainstore is ready. The apply can take noticeably longer as a result. During the refresh, reader capacity can temporarily double. Writer nodes refresh independently and don’t hold up the apply.
Terraform waits up to 14 minutes for the refreshes, then up to 14 more minutes in the same apply. The apply fails, and API updates stay blocked, if a refresh fails, health checks fail, or the second wait also runs out.Fix the reported failure and rerun terraform apply. The apply checks live AWS state and resumes an active refresh. Progress and refresh IDs are logged to the /braintrust/<deployment_name>/<deployment_name>-BrainstoreDeployment CloudWatch log group.

Next steps

  • Self-hosting releases — review release notes and infrastructure requirements for each data plane version
  • Configuration — configure telemetry, network access, rate limiting, and other options