<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hunter Leath</title>
    <description>The latest articles on DEV Community by Hunter Leath (@jhleath).</description>
    <link>https://dev.to/jhleath</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4261614%2F1904bfc8-a638-45d6-88f5-ac0c856e585a.png</url>
      <title>DEV Community: Hunter Leath</title>
      <link>https://dev.to/jhleath</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jhleath"/>
    <language>en</language>
    <item>
      <title>Per-tenant storage for multi-tenant AI agents: a subdirectory is not a security boundary</title>
      <dc:creator>Hunter Leath</dc:creator>
      <pubDate>Tue, 24 Nov 2026 01:50:55 +0000</pubDate>
      <link>https://dev.to/jhleath/per-tenant-storage-for-multi-tenant-ai-agents-a-subdirectory-is-not-a-security-boundary-2ii3</link>
      <guid>https://dev.to/jhleath/per-tenant-storage-for-multi-tenant-ai-agents-a-subdirectory-is-not-a-security-boundary-2ii3</guid>
      <description>&lt;p&gt;If you run a multi-tenant agent product, every customer's agent eventually needs somewhere to keep files: uploaded documents, a cloned repo, intermediate results, a SQLite database it builds up over days. The obvious first design is one shared volume with a directory per tenant. It works in a demo, and it's the wrong isolation boundary once the agent runs code you didn't write.&lt;/p&gt;

&lt;p&gt;This post walks through the options I see teams use, what each one actually isolates, and where each one fits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a subdirectory per tenant isn't isolation
&lt;/h2&gt;

&lt;p&gt;Say every tenant's sandbox mounts the same volume, and tenant A's agent is supposed to stay in &lt;code&gt;/data/tenant-a&lt;/code&gt;. Two things undo that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The credential covers the whole volume.&lt;/strong&gt; Whatever lets the sandbox mount &lt;code&gt;/data/tenant-a&lt;/code&gt; (an NFS export, a mount token, an IAM grant) usually lets it mount &lt;code&gt;/data&lt;/code&gt;. If the agent can read its own environment or a config file, it can mount everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;POSIX permissions aren't a boundary against untrusted code.&lt;/strong&gt; Agents run generated code, often as root inside the sandbox. &lt;code&gt;chmod 700&lt;/code&gt; doesn't protect tenant B's directory from a process that can become any UID.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Subdirectories are great for organizing work &lt;em&gt;within&lt;/em&gt; one tenant, such as a directory per agent or per task. Between tenants you want a boundary that the credential itself enforces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Amazon EFS with an access point per tenant
&lt;/h2&gt;

&lt;p&gt;If everything runs on AWS, this is a solid pattern. An EFS access point pins a client to a root directory and a POSIX identity, so a client mounted through tenant A's access point can only see tenant A's directory tree. To make that a real boundary, require IAM authorization and write a policy that only lets tenant A's role mount through tenant A's access point (the &lt;code&gt;elasticfilesystem:AccessPointArn&lt;/code&gt; condition key).&lt;/p&gt;

&lt;p&gt;Things to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A file system supports 10,000 access points by default, so very large tenant counts mean several file systems or a quota increase.&lt;/li&gt;
&lt;li&gt;Clients mount with the EFS mount helper using the &lt;code&gt;iam&lt;/code&gt; option; it's NFS, so it's AWS-only in practice.&lt;/li&gt;
&lt;li&gt;Each tenant needs an IAM role or session policy that names its access point.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Option 2: An S3 prefix per tenant with scoped credentials
&lt;/h2&gt;

&lt;p&gt;Give each tenant a prefix such as &lt;code&gt;s3://bucket/tenants/&amp;lt;id&amp;gt;/&lt;/code&gt;, and hand its workers short-lived credentials from &lt;code&gt;AssumeRole&lt;/code&gt; with a session policy that only allows that prefix. This is strong isolation and cheap at any tenant count.&lt;/p&gt;

&lt;p&gt;The catch is that agents want files, not objects. You're back to either downloading and uploading around every agent step, or running a FUSE client over the prefix. Most S3 FUSE clients don't handle in-place edits, renames or SQLite well; I covered that in &lt;a href="https://dev.to/jhleath/giving-an-ai-agent-file-access-to-an-s3-bucket-s3-files-vs-mountpoint-vs-archil-nl"&gt;Giving an AI agent file access to an S3 bucket&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: A volume per tenant
&lt;/h2&gt;

&lt;p&gt;The cleanest boundary is one volume per tenant, with credentials that can only reach that volume. Block volumes (EBS) give you this but attach to one machine at a time, which doesn't fit agents that run in short-lived sandboxes or several workers at once. An EFS file system per tenant works too, but accounts start with a quota of 1,000 file systems per Region, and each tenant still needs its own mount targets and IAM setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 4: A disk per tenant on Archil
&lt;/h2&gt;

&lt;p&gt;This is what we built Archil for. A disk is the isolation unit: its credentials are scoped to that one disk, including its branches and checkpoints. Creating one is a single API call (9.3 ms at p50), so you can create it at tenant signup, or lazily the first time that tenant's agent runs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;archil&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"disk"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// On your backend, with your Archil API key.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;archil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createDisk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`tenant-${tenantId}`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Store disk.id with the tenant. `token` mounts this disk only and is returned once.&lt;/span&gt;

&lt;span class="c1"&gt;// Later: issue a token for one worker, or revoke it.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`worker-${workerId}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"token"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run that tenant's agents in a sandbox that mounts only its disk. With Archil's own sandboxes, the mount is authenticated for you, so the sandbox never holds a token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Archil&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"disk"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Archil&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ARCHIL_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"aws-us-east-1"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;sandbox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sandboxes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;baseImage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ubuntu:24.04"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;mounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tenantDiskId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/mnt/archil"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The files live on the disk, not the sandbox, so they survive sandbox restarts, and the next sandbox for that tenant sees the same files. The same disk mounts over FUSE in other providers' sandboxes (E2B, Modal, Daytona, Vercel Sandbox) and is readable from your web app over an S3 API with per-tenant, expiring credentials.&lt;/p&gt;

&lt;p&gt;Two things that matter at thousands of tenants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Idle tenants are cheap.&lt;/strong&gt; Storage is metered on the data each disk holds, not on the number of disks. Data stays at the active rate for up to an hour after its last access, then an idle tenant's disk falls back to the lower archive rate (or, if the disk syncs to the tenant's own bucket, to just that bucket). Most tenants are idle most of the time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offboarding is one call.&lt;/strong&gt; Revoke the tenant's tokens and delete the disk. If a tenant brought their own bucket, deleting the disk stops syncing and leaves their objects with them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The docs have the full guide, including tenants who bring their own bucket: &lt;a href="https://docs.archil.com/guides/storage/per-tenant-storage" rel="noopener noreferrer"&gt;Isolated per-tenant storage&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A checklist, whatever you pick
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Keep org-wide credentials (API keys, admin IAM roles) on your backend. Never put them in a tenant's sandbox.&lt;/li&gt;
&lt;li&gt;Give each tenant's workers credentials that can reach only that tenant's data, and give them expiries.&lt;/li&gt;
&lt;li&gt;Use subdirectories, branches or separate mounts to separate agents &lt;em&gt;within&lt;/em&gt; a tenant, not between tenants.&lt;/li&gt;
&lt;li&gt;Decide up front what deleting a tenant means for their data, and test it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How are you isolating tenant data for agents today? I'm curious what's worked, and what hasn't, in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>aws</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Giving an AI agent file access to an S3 bucket: S3 Files vs Mountpoint vs Archil</title>
      <dc:creator>Hunter Leath</dc:creator>
      <pubDate>Tue, 24 Nov 2026 01:50:37 +0000</pubDate>
      <link>https://dev.to/jhleath/giving-an-ai-agent-file-access-to-an-s3-bucket-s3-files-vs-mountpoint-vs-archil-nl</link>
      <guid>https://dev.to/jhleath/giving-an-ai-agent-file-access-to-an-s3-bucket-s3-files-vs-mountpoint-vs-archil-nl</guid>
      <description>&lt;p&gt;Your agent needs to work on data that already lives in S3: a few hundred GB of documents, a dataset, a repo snapshot. Agents are good with files. They reach for &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;cat&lt;/code&gt;, Python, git and SQLite, and they are much worse at paging through &lt;code&gt;ListObjectsV2&lt;/code&gt;. So the practical question is how to give the agent a file system over the bucket without copying the data somewhere else first.&lt;/p&gt;

&lt;p&gt;There are three serious options today: &lt;strong&gt;Amazon S3 Files&lt;/strong&gt;, &lt;strong&gt;Mountpoint for Amazon S3&lt;/strong&gt;, and &lt;strong&gt;Archil&lt;/strong&gt;. They all expose existing objects as files without a migration. They differ in which file operations actually work, where you can mount them, and when writes show up in the bucket.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Amazon S3 Files&lt;/th&gt;
&lt;th&gt;Mountpoint for Amazon S3&lt;/th&gt;
&lt;th&gt;Archil&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What it is&lt;/td&gt;
&lt;td&gt;NFS file system for an S3 bucket, built on Amazon EFS&lt;/td&gt;
&lt;td&gt;Open-source FUSE client that turns file operations into S3 requests&lt;/td&gt;
&lt;td&gt;Managed POSIX file system with an SSD layer replicated across AZs, synced to your bucket&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Buckets&lt;/td&gt;
&lt;td&gt;Amazon S3, with Versioning enabled&lt;/td&gt;
&lt;td&gt;Amazon S3 only&lt;/td&gt;
&lt;td&gt;Amazon S3, GCS, Cloudflare R2, S3-compatible stores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Where you can mount&lt;/td&gt;
&lt;td&gt;AWS compute&lt;/td&gt;
&lt;td&gt;Anywhere you can run the client&lt;/td&gt;
&lt;td&gt;Anywhere Linux runs, including other clouds and sandbox providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edit existing files&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Sequential writes only; overwrite is opt-in and replaces the whole file&lt;/td&gt;
&lt;td&gt;Yes, including random writes and appends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rename&lt;/td&gt;
&lt;td&gt;Works on the file system; in the bucket each object is copied and deleted, so not atomic&lt;/td&gt;
&lt;td&gt;Files on S3 Express One Zone only; no directory rename&lt;/td&gt;
&lt;td&gt;Atomic on the disk, including directories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Several machines writing&lt;/td&gt;
&lt;td&gt;Yes, over NFS&lt;/td&gt;
&lt;td&gt;No coordination between writers&lt;/td&gt;
&lt;td&gt;Yes, up to 5,000 clients per disk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;When writes reach the bucket&lt;/td&gt;
&lt;td&gt;After 60 seconds without writes to the file, as a new object version&lt;/td&gt;
&lt;td&gt;On close or &lt;code&gt;fsync&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;In the background, usually ~20 seconds after the last write&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What breaks when an agent uses a "read-mostly" mount
&lt;/h2&gt;

&lt;p&gt;Agent workloads are not data-lake workloads. In one session a coding or research agent will typically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git clone&lt;/code&gt; or &lt;code&gt;git checkout&lt;/code&gt; (lots of small files, renames, lock files)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;pip install&lt;/code&gt; (thousands of small files, directory renames)&lt;/li&gt;
&lt;li&gt;open a SQLite database and update it in place&lt;/li&gt;
&lt;li&gt;append to a log or notes file across many tool calls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mountpoint is built for the opposite pattern: large sequential reads and write-once files. That makes it excellent for training data and data lakes, and it's free. But in-place edits, appends, and directory renames don't work, so git, package managers and SQLite fail or need workarounds.&lt;/p&gt;

&lt;p&gt;S3 Files gives you real NFS semantics on AWS. That's a big step up for agents running on EC2, ECS, EKS or Lambda in the same account. The trade-offs are that it's AWS-only, it requires bucket versioning, and a rename on the file system becomes a copy-and-delete per object in the bucket.&lt;/p&gt;

&lt;p&gt;Archil keeps the bucket as the system of record but serves reads and writes from its own SSD layer, so in-place edits, appends and atomic renames behave like a local disk. It also runs outside AWS and works with GCS and R2.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to pick each
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pick Mountpoint&lt;/strong&gt; when reads of large objects dominate, one writer at a time creates new files sequentially, and you want a free client with no service in the data path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pick S3 Files&lt;/strong&gt; when your agents run on AWS compute, you want IAM-governed access to existing S3 data with S3 Versioning as your history, and you already isolate the code that runs there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pick Archil&lt;/strong&gt; when agents edit files in place, run git, npm or SQLite on the data, or rename directories; when several machines write the same tree; when the data is in GCS or R2; or when your agents run outside AWS, for example in E2B, Modal, Daytona or Vercel Sandbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  What mounting an existing bucket looks like with Archil
&lt;/h2&gt;

&lt;p&gt;Create a disk that points at the bucket. The objects already there show up as files, and files the agent writes land back in the bucket as normal objects at the matching key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;archil&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"disk"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;archil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createDisk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"research-data"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;mounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"s3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;bucketName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"my-bucket"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;bucketPrefix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"datasets/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;accessKeyId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"AKIA..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;secretAccessKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then mount it wherever the agent runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://archil.com/install &lt;span class="o"&gt;|&lt;/span&gt; sh
sudo mkdir -p /mnt/archil
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ARCHIL_MOUNT_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;disk-token&amp;gt;"&lt;/span&gt;
sudo --preserve-env=ARCHIL_MOUNT_TOKEN archil mount &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;org&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/research-data /mnt/archil --region aws-us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On S3 you can skip static keys and use a bucket policy scoped to the disk instead. A few behaviors are worth knowing before you point production data at it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writes are durable once &lt;code&gt;fsync&lt;/code&gt; returns. Other Archil clients see them immediately; tools reading the bucket directly see them after the background copy.&lt;/li&gt;
&lt;li&gt;Objects written straight to the bucket show up after Archil relists that directory, usually within 5 to 10 minutes. A directory that hasn't been listed yet picks them up on first read.&lt;/li&gt;
&lt;li&gt;Don't write the same file from the bucket side and the file system side at the same time.&lt;/li&gt;
&lt;li&gt;Deleting the disk leaves your data in the bucket.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full walkthrough, including the bucket policy and the GCS and R2 variants, is in the docs: &lt;a href="https://docs.archil.com/guides/storage/mount-existing-bucket" rel="noopener noreferrer"&gt;Mount an existing S3 bucket as a POSIX file system&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've run agents against Mountpoint or S3 Files and hit something I didn't cover here, I'd like to hear about it in the comments.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>storage</category>
      <category>ai</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
