S3 Files: same NFS mount, 13x cheaper


AWS FOR THE REAL WORLD
⏱️
Reading time: 10 minutes
🎯
Main Learning: S3 Files gives POSIX access at S3 prices: 13x cheaper than EFS for large files, but the 60-second write-back delay silently breaks coordination patterns!
📝

Hey Reader 👋🏽

Sandro is currently traveling through Portugal - work and fun combined! If you happen to be around, reach out. Would be great to meet up! 🤝

This week we're digging into S3 Files: a POSIX file system backed by an S3 bucket! 🪣

The headline is 13x cheaper than EFS for large-file workloads. But there's a 60-second write-back delay that silently breaks patterns you're probably relying on right now. 👀

We'll walk through how it works, what breaks, and how to set it up with Lambda.
Rather watch a video? We've got you covered!

Sponsored

The only AI reviewer I actually kept using

CodeRabbit pairing with Claude Code

One of the first serious code review tools I used was CodeRabbit - and I still haven't found a better reviewer. Copilot's review mode nitpicks everything and needs repo-level instructions just to be usable. CodeRabbit is built for reviews and it shows.

What I like even more now:

  • 🐰 Pairs with Claude Code. CodeRabbit finds the issue, one click, Claude Code fixes it in your IDE. The feedback loop is insane.
  • 💻 Free IDE extension. CLI, Cursor, Windsurf - reviews before you even push.
  • 🎁 Free for open source. Every OSS PR gets full reviews. No trial, no card.

Sponsored by CodeRabbit. Genuine recommendation 💛

S3 Files — 13x Cheaper Than EFS

📚 This Week's Deep Dive

S3 Files — 13x Cheaper Than EFS

EFS Standard storage costs $0.30/GB-month. S3 costs $0.023/GB-month. AWS recently released S3 Files: a POSIX file system with an S3 bucket as the backing store. Same NFS mount, same fs.readFile calls, Lambda reads files like a normal file system. The data just lives in S3 instead of EFS.

One terabyte on EFS Standard: $307/month. The same terabyte on S3 Files: around $25/month.

EFS vs S3 Files — $307 vs $25 for 1 TB

How it works

Three resources to understand:

  1. File system — maps NFS paths to S3 object keys.
  2. Mount target — the NFS endpoint inside your VPC. Lambda connects over port 2049, same as EFS.
  3. Access point — scoped entry with an assigned POSIX user. Lambda uses the access point ARN to mount.

One thing that surprises people: the IAM service role uses the elasticfilesystem.amazonaws.com principal — not a separate one. S3 Files shares the NFS layer with EFS. Only the storage backend is different.

⚠️ The 60-second write-back delay

This is the part that bites teams.

When Lambda writes a file, the data lands in the kernel's NFS cache first. The NFS client flushes that cache to the mount target after a write-back interval. Then the mount target pushes to S3. Two hops, each with their own delay. Total: typically around 60 seconds.

Write-back delay sequence diagram

Patterns that break silently:

  • Coordination via file existence (if file exists, skip)
  • Handoff between concurrent Lambda invocations using file writes as signals
  • Any write-then-immediately-read pattern across different Lambda instances

For coordination: use SQS, DynamoDB, or S3 directly. S3 has had strong read-after-write consistency since 2020.

POSIX limits

If your code only uses fs.readFile, fs.writeFile, fs.readdir — you're fine. But these break:

  • Hard links — not supported. Tools like rsync --hard-links will error or fall back to copies silently.
  • Advisory locks (flock, fcntl) — succeed locally but have no effect across Lambda instances. Concurrent invocations writing to the same cache directory will corrupt data.
  • SQLite, LevelDB, RocksDB — all use file locking for write serialization. Corrupt data under concurrent access on S3 Files.
  • Atomic rename on directories — the rename window is visible to other readers. The write-to-temp-then-rename pattern isn't atomic here.

When to use which

S3 Files vs EFS decision guide

Use S3 Files when: you need POSIX access to data already in S3, your workload is read-heavy or write-once, cost matters more than consistency speed.

Use EFS when: you need strict read-after-write consistency across concurrent processes, your code uses file locking or hard links, or you're running a file-based database.

The full post walks through the SAM setup, service role permissions, CloudFormation custom resource for async provisioning, and the complete cost model for small-file workloads (where the math flips and S3 Files ends up more expensive than EFS).

📰 This Week in AWS

🌐AWS Interconnect goes multicloud

AWS Interconnect now connects your AWS environment to Google Cloud — no VPN, no public internet. Azure and Oracle Cloud support is coming. If you're running workloads across clouds or have contractors on GCP, private connectivity between them just got a lot simpler. Read More →

🤖Claude Mythos enters limited preview

Anthropic's Claude Mythos is in preview, but only for a handful of companies so far. Early benchmark results look genuinely impressive. Worth keeping an eye on — this one seems different from the usual model release noise. Read More →

That's it for this week!

S3 Files is one of those features where the price pitch is obvious but the gotchas are real. The 60-second write-back delay sounds minor until something in production breaks silently.

If you're on EFS for a large-file workload, it's worth a proper test. If you're building something new in Lambda with data already in S3, it's a straightforward win! 💪

See you soon!

Sandro & Tobi

AWS for the Real World

We teach AWS for the real world - not for certifications. Join more than 10,500 developers learning how to build real-world applications on AWS.

Read more from AWS for the Real World

AWS FOR THE REAL WORLD ⏱️ Reading time: 11 minutes 🎯 Main Learning: A Karpenter NodePool is a placement policy, not an instance preference. Pin one instance family, and a Spot shortage moves your fleet across availability zones, where every internal call starts costing $0.01 per GB. 📝 Blog Post Hey Reader 👋🏽 Important off topic things first: Sandro got married! 🎉We were in Munich for it and it was a fantastic day! ☀️Highly recommend a wedding over sprint planning or fighting with AWS...

AWS FOR THE REAL WORLD ⏱️ Reading time: 6 minutes 🎯 Main Learning: One stack, reused for every project. Hono on Lambda, Postgres with Drizzle, a TanStack SPA on S3 and CloudFront, and Better Auth for login. 📝 Blog Post Hey Reader 👋🏽we've build a lot of fullstack applications so far: client projects side projects (this one, shopify apps, etc.) example tutorial apps Over the past few years we switched up tech stacks a lot. That taught us what actually matters in a stack and what is just...

AWS FOR THE REAL WORLD ⏱️ Reading time: 10 minutes 🎯 Main Learning: Wildcards come from the tooling, not from laziness. Put least privilege at the account level and let an agent write the policies. 📝 Blog Post Hey Reader 👋🏽 I have shipped my share of s3:* at unusual hours and told myself I would refactor it later - which obviously never happened 😅 So when someone on r/aws asked why developers can't write least privilege policies and put it down to laziness, I was excited to read through all...