Always upgrade one major version at a time. If you are on v5.x, upgrade to v6 first. See the routine upgrade guide for the standard process.
What changed
- Omitted variables mean ECS and the Gateway. On v6, omitted variables mean Lambda and no Gateway. On v7, the module routes API traffic to ECS, builds the Gateway, routes the API and Loop runtime through it, and points CloudFront
/v1/proxyat it. The Gateway adds AWS charges. - The API Lambda functions are removed in ECS mode. When
enable_ecs_apiistrue, the module deletes the APIHandler and AI Proxy Lambda functions, the AI Proxy function URL, and API Gateway. The quarantine, database migration, catchup ETL, and cron Lambda functions stay. Settingenable_ecs_apiback tofalsecreates a new Lambda path with a new function URL hostname. It doesn’t restore the previous functions. - Quarantine LLM calls use CloudFront when the AI Proxy function is gone. Without
quarantine_proxy_urloruse_private_gateway_quarantine_proxy, LLM calls from custom scorers and tools go to the deployment’s CloudFront/v1/proxyURL through the quarantine VPC’s NAT gateway. If you restrict CloudFront with a WAF or a source IP allowlist, allow that NAT gateway address. To keep these calls inside your VPCs instead, see Braintrust Gateway.
Before you upgrade
If you’re moving to the private Gateway, the v7 default, finish these applies on the latest v6 release before you bump the module. For any other configuration, skip to Choose your configuration.-
Build the API ECS services. This is the first apply of the v6 upgrade, with
enable_ecs_apileft at its v6 default offalse, so customer traffic stays on Lambda. -
Build the Gateway without moving traffic and apply:
-
Cut over API traffic and the Gateway together and apply:
- Run API requests, ingest traces, and run an eval to confirm traffic flows through ECS and the Gateway.
Choose your configuration
Set the routing variables in your module block to match the configuration you want on v7.Private Gateway (default)
After the v6 applies, your configuration matches the v7 defaults. You can keep these lines or remove them:Stay on Lambda
To keep customer traffic on Lambda, setenable_ecs_api = false, then pick the Gateway settings that match your deployment.
Gateway built but not enabled
Gateway built but not enabled
If you built the Gateway on v6 but haven’t enabled it, keep
create_ai_gateway = true so the apply doesn’t destroy the Gateway load balancer and ECS service. Enable the other two variables in a later apply.Never built a Gateway
Never built a Gateway
To keep the Gateway absent, set all four variables to
false:Lambda with the Gateway enabled
Lambda with the Gateway enabled
true, so this apply builds the Gateway if it doesn’t exist, enables it, and points CloudFront /v1/proxy at it.Run without the Gateway
To run on ECS without the Gateway, set all three Gateway variables tofalse:
create_ai_gateway = false fails the plan, because the other two variables default to true.
A deployment still on Lambda moves to ECS on this apply, which deletes the API Lambda functions, their function URL, and API Gateway. To stay on Lambda, also set enable_ecs_api = false.
Use the Braintrust-hosted Gateway
To route CloudFront/v1/proxy to the Braintrust-hosted Gateway instead of a private one:
create_ai_gatewayandenable_ai_gateway: If you omit them, the apply still builds the private Gateway and points the API and Loop runtime at it, because both default totrue.use_private_gateway_quarantine_proxy: Must befalse, because it requirescreate_ai_gateway.
/v1/proxy URL leave your data plane for the hosted Gateway. As with Run without the Gateway, a deployment still on Lambda moves to ECS on this apply unless you also set enable_ecs_api = false.
Upgrade steps
1
Bump the module to v7
Update your module source and add the variables for the configuration you chose:
2
Review and apply
3
Verify the data plane
Exercise the data plane. Run API requests, ingest traces, and run an eval. Go to Settings > Brainstore and confirm all settings under Brainstore configuration show green status.
Roll back to v6
Before you roll back to a v6 release, setenable_ecs_api = true in your configuration. On v6 the default is false, so an omitted variable creates the Lambda path again, including the APIHandler and AI Proxy Lambda functions, a new function URL, and API Gateway. Set the Gateway variables explicitly too, because they default to false on v6.
Next steps
- Self-hosting releases: review release notes and infrastructure requirements for each data plane version.
- Braintrust Gateway: size the Gateway and route quarantine LLM calls through it.
- Scaling and storage: size the API ECS services.