Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 62 additions & 5 deletions src/langsmith/data-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,72 @@ Update the LangSmith URL appropriately for self-hosted installations or organiza
For the EU region, use `eu.api.smith.langchain.com`.
</Note>

<Note>
**Permissions required**
#### Permissions required

Both the `backend` and `queue` services require write access to the destination bucket:

- The `backend` service attempts to write a test file to the destination bucket when the export destination is created.
It will delete the test file if it has permission to do so (delete access is optional).
- The `backend` service attempts to write a test file to the destination bucket when the export destination is created. It will delete the test file if it has permission to do so (delete access is optional).
- The `queue` service is responsible for bulk export execution and uploading the files to the bucket.
</Note>

**AWS S3 permissions**

The minimal AWS S3 permission policy requires the following permissions:

- `s3:PutObject` (required): Allows writing Parquet files to the bucket.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"s3:AbortMultipartUpload", is also recommended to avoid dangling multipart uploads - the library we use under the hood uses multipart uploads

- `s3:DeleteObject` (optional): Used for cleanup of test files during destination creation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would add that if this isn't present, the file is left under the /tmp directory after destination creation

- `s3:GetObject` (optional but recommended): Used to verify file size after writing.

Minimal IAM policy example:

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::YOUR_BUCKET_NAME/*"
]
}
]
}
```

Recommended IAM policy example with additional permissions:

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:DeleteObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::YOUR_BUCKET_NAME/*"
]
}
]
}
```

**Google Cloud Storage (GCS) permissions**

When using GCS with the S3-compatible XML API, the following IAM permissions are required:

- `storage.objects.create` (required): Allows writing files to the bucket.
- `storage.objects.delete` (optional): Used for test file cleanup during destination creation.
- `storage.objects.get` (optional but recommended): Used for file size verification after writing.

These permissions can be granted through the "Storage Object Admin" predefined role or a custom role.

#### Create a destination

The following example demonstrates how to create a destination using cURL. Replace the placeholder values with your actual configuration details.
Note that credentials will be stored securely in an encrypted form in our system.
Expand Down