Skip to main content
By default, AWS-managed keys encrypt a BYOC data plane at rest. You can instead encrypt it with your own symmetric AWS KMS keys, using one key for every service or a separate key per service:

Requirements and limitations

  • Every service is optional. A service without a key keeps AWS-managed encryption.
  • Keys must be symmetric encryption keys in the data plane region. They can be in the data plane account or in another AWS account.
  • You set keys when you create the data plane. Keys cannot be added to existing data planes.
  • After creation, the ebs, eks, rds, and elasticache keys cannot change. To change the s3 key, contact the LangChain team.
If you disable or delete a key, every service that uses it stops working. Data encrypted with a deleted key cannot be recovered.

Prepare the keys

Before you create the data plane, prepare the keys:
  1. In the langsmith-byoc-role Terraform module, set cmk_service_key_arns to a key ARN for each service. To use one key for every service, set the same key ARN for each service. With BYOIAM, set it in the BYOIAM module too.
  2. Update the key policies as the module README describes. The ebs key policy must allow the Auto Scaling service-linked role. When LangSmith manages the VPC, the s3 key policy must allow VPC flow log delivery.
A key in another AWS account also needs key policy statements that allow the provisioning role and each BYOIAM role. An ebs key in another account also needs a grant for the Auto Scaling service-linked role, created from the data plane account, as the module README describes. LangSmith cannot read the policy of a key in another account, so make sure the policy is complete before you create the data plane.

Set the keys when you create the data plane

In the UI, open Encryption keys under Configuration when you create the data plane. Choose One key for all services or A key per service, then enter the key ARNs. Through the API, include customer_managed_keys in the body of the create data plane request, alongside the other required fields. It takes two fields:
  • key_arn: A key ARN for every service.
  • service_key_arns: An object whose keys are service names and whose values are key ARNs.
Set key_arn, service_key_arns, or both. A key in service_key_arns overrides key_arn for its service. Without key_arn, a service that service_key_arns does not list keeps AWS-managed encryption.

How LangSmith validates the keys

Before it creates the data plane, LangSmith checks each key:
  • The key exists and is enabled.
  • The key is a symmetric encryption key.
  • The provisioning role can use the key.
For keys in the data plane account, LangSmith also checks two key policies:
  • The ebs key policy allows the Auto Scaling service-linked role.
  • When LangSmith manages the VPC, the s3 key policy allows VPC flow log delivery.
LangSmith does not check the policy of a key in another account.

See also