Before you begin
Complete the BYOC prerequisites to have a LangSmith org, with BYOC enabled.Create the IAM resources
Thebyoiam Terraform module creates the shared data plane roles, policies, and Karpenter instance profile. Apply it once per AWS account for all regions and data planes that use these roles.
To create the IAM resources:
- Configure the AWS provider for the account where you plan to deploy your data planes.
- Add the module to your Terraform configuration. Set
regionsto the supported AWS regions where the roles need to operate. - (Optional) Set
permissions_boundary_arnto the ARN of your IAM permissions boundary policy. The module applies it to all roles it creates, except service-linked roles. - Use
service_linked_roles_to_createto create missing service-linked roles. None are created by default. Omit existing roles, or import them into Terraform first. - Initialize Terraform, review the plan, and apply it in your account.
Use custom IAM names
By default, the module names its resources with abyoc-smith- prefix. If your organization enforces an IAM naming convention, such as a mandatory prefix, override the names with these inputs:
role_names: A map of custom role names, keyed by role purpose. The keys match the module’srole_namesoutput, such aseks-cluster-roleorworkload-iam-role. Roles you omit keep their default names.karpenter_instance_profile_name: A custom name for the Karpenter node instance profile.karpenter_controller_policy_name: A custom name for the Karpenter controller policy.
module.byoiam.role_names and module.byoiam.karpenter_instance_profile_name outputs. You paste them into the data plane form when you create the data plane. You do not paste the Karpenter controller policy name into LangSmith.
Remove IAM management permissions from the provisioning role
Thelangsmith-byoc-role Terraform module creates the cross-account role LangChain assumes to manage your data plane.
After creating the IAM resources, configure the provisioning role:
-
Copy the external ID using the button next to the Data Planes header in Settings > Data Planes. Pass it to the role module as
external_id. The role’s trust policy must use this value in itsExternalIdcondition. -
Set
allow_iam_management_permissions = falsein yourlangsmith-byoc-rolemodule configuration. -
Pass the outputs of the
byoiammodule, which you applied in Create the IAM resources, to the role module: -
Review and apply the Terraform changes. Retain the
crossplane_role_arnoutput for data plane creation.
byoc-smith- names. With custom IAM names, these inputs are required. They grant read and iam:PassRole access on the exact ARNs. With default names, they are redundant but harmless.
Setting allow_iam_management_permissions = false changes the role’s permissions:
- Removed: IAM creation, modification, and deletion permissions, including service-linked role creation.
- Retained: IAM read permissions, scoped
iam:PassRole, andiam:SimulatePrincipalPolicyto use and validate your existing resources.
allow_delete_permissions does not restore IAM management permissions.
If you also want to bring your own VPC, set allow_vpc_creation_permissions = false and supply the VPC ID in vpc_ids.
Deploy the data plane with existing roles
The Use existing IAM roles checkbox configures the data plane to use the IAM resources you created. To deploy the data plane:- Go to Settings > Data Planes and create a data plane.
- Supply the name, AWS region, network configuration, and load balancer access described in BYOC onboarding. Choose a region included in the module’s
regionsinput. - Use the provisioning role’s
crossplane_role_arnoutput for the AWS IAM role ARN. - Select Use existing IAM roles.
- If you set custom IAM names, paste the values of
module.byoiam.role_namesandmodule.byoiam.karpenter_instance_profile_nameinto the data plane form. - Submit the request.
See also
Connect these docs to your agent of choice via MCP for real-time answers.

