Before you begin
Prepare an AWS account that meets these requirements:- Dedicated account. The account must be dedicated to infrastructure that Braintrust manages. It can host more than one Braintrust data plane.
- AWS Organizations member account. The account must be a member account in an AWS Organization with service control policies (SCPs) enabled. It can’t be the organization’s management account.
- S3 Block Public Access. Turn on all four account-level Block all public access settings before you apply the required SCPs.
1. Agree on the deployment design
Agree with Braintrust on the following for each environment:- AWS account, Region, and capacity.
- Network, endpoint, and security requirements.
- Logging, security monitoring (SIEM), and contacts.
aws partition. Deploying in another Region requires a separate bootstrap or corresponding policy scope.
For design and security review, see what runs in your account, bootstrap resources, and AWS access and security.
2. Prepare and review the bootstrap
The bootstrap is a CloudFormation stack that you apply with your own AWS credentials. Braintrust never receives or forwards your credentials, and the bootstrap doesn’t install a persistent agent in your account. One bootstrap can serve several data planes in the same account and Region. Each data plane has separate Terraform state and operation records.1
Prepare the license secret
Braintrust helps set up your organization and provides the Brainstore license key.Store the Brainstore license key in AWS Secrets Manager:
- Use the agreed account and Region.
- Encrypt it with the default AWS managed key (
aws/secretsmanager). Customer managed keys aren’t supported for this secret. - Provide the secret ARN, not the key value.
2
Review the package
Braintrust sends a one-time package containing:
- The CloudFormation template.
parameters.json, with a unique External ID that you never return to Braintrust.README.md, with commands for your account, Region, and stack.
3
Review resources and permissions
Before applying the bootstrap, review the template, every IAM policy, and the role capabilities with your security team.All bootstrap IAM resources use the protected
/braintrust-byoc/ IAM path and end with your bootstrap name. Replace <BOOTSTRAP_NAME> with that name. The IAM path is part of the ARN, not the resource name.- Roles:
BraintrustDeploymentRole-<BOOTSTRAP_NAME>,BraintrustObserverRole-<BOOTSTRAP_NAME>, andBraintrustDiagnosticsRole-<BOOTSTRAP_NAME>. See Roles and access. - Policies: Managed policies for those roles and
BraintrustRuntimeBoundary-<BOOTSTRAP_NAME>, a permissions boundary that caps every workload IAM role the deployment creates. - Storage: Separate S3 buckets for Terraform state and operation records. Both use versioning and server-side encryption with S3 managed keys (SSE-S3), the only encryption the bootstrap supports for these buckets. Both are retained if the stack is deleted.
- Diagnostics logging: A Session Manager document and a CloudWatch log group,
/braintrust-byoc/<bootstrap-name>/diagnostics, that record Diagnostics sessions.
bt-a-. The prefix must be 2 to 8 characters and end in a hyphen. Each deployment name starts with that prefix and is at most 18 characters.4
Add the license secret ARN
In
parameters.json, set BrainstoreLicenseSecretArn to the ARN of your license secret. Don’t change the External ID.3. Apply the bootstrap
Create the reviewed bootstrap stack, apply the required guardrails, and send Braintrust the outputs.1
Create the stack
Confirm that your AWS CLI identity and Region match the target account, then create the stack as described in the package
README.md. The stack creates named IAM resources, so it requires CAPABILITY_NAMED_IAM:2
Apply the guardrails
Before your AWS Organizations owner reviews the three required SCPs, confirm that they contain your final deployment values, including the license secret ARN. The package includes an optional script that prepares the policy JSON, or you can use your own process.After review, attach the SCPs to the BYOC account, or confirm that equivalent controls already apply. Braintrust never attaches SCPs.
3
Return the outputs
When the stack reaches Send Braintrust
CREATE_COMPLETE, export its ID and outputs:byoc-bootstrap-outputs.json. It contains the stack ID, account ID, Region, deployment role ARN, Terraform state bucket, operation log bucket, and license secret ARN, but no External ID or secret values. Then securely delete parameters.json.4. Deploy and validate
Braintrust checks its access, your account configuration, required services, and quotas without deploying the data plane. These checks cover the Region, roles, buckets, and license secret metadata. Validation doesn’t read the license value or the contents of Terraform state. Braintrust then reviews and confirms the Terraform plan and applies the deployment. Maintenance notice and coordination follow your agreement. You and Braintrust confirm the endpoint, organization routing, capacity, audit logging, and SIEM export. Braintrust then connects your organization to the new data plane.What runs in your account
Braintrust deploys the data plane with the Braintrust AWS Terraform module. A deployment includes:- Endpoint: CloudFront, which routes API traffic through a VPC origin to an Application Load Balancer (ALB) for the ECS API services. It supports an optional custom domain, ACM certificate, and WAF.
- Compute: ECS services for the API, and EC2 Auto Scaling groups for Brainstore.
- Storage: RDS PostgreSQL, ElastiCache for Redis, and S3 buckets for Brainstore data, responses, and code bundles.
- Security and operations: KMS keys, Secrets Manager secrets, IAM roles, and CloudWatch logs and alarms.
- Networking: A main VPC, or a VPC you provide, plus a quarantine VPC, enabled by default, that isolates user-defined code execution.
enable_quarantine_vpc defaults to true. If you disable it, user-defined functions, including custom code scorers, are unavailable. They do not run in the API process instead.
Braintrust provides the standard supported networking setup. Raise any additional DNS, WAF, or connectivity requirements, such as private access, with Braintrust during scoping.
Next steps
- BYOC operations and lifecycle: Understand how Braintrust operates the deployment after setup.
- AWS access and security: Review access, audit records, and revocation.