# Lambda S3 Files vs EFS — decision checklist (July 2026)

Use before choosing a Lambda mount target for shared files. Verify against current [AWS Lambda S3 Files](https://docs.aws.amazon.com/lambda/latest/dg/configuration-s3files.html) and [EFS](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html) docs — product names and limits move.

## Must-answer before you pick

1. **Write pattern** — append-only / overwrite whole object / random-access mutation of large files?
2. **Concurrency** — many concurrent writers to the same path?
3. **Cold-start budget** — ms-critical path or batch/async okay?
4. **Compute model** — on-demand only, or capacity providers / Managed Instances?
5. **Network posture** — can you accept (or afford) a VPC for EFS?
6. **Bucket controls** — can you enable **S3 Versioning** on the backing bucket? (required for S3 Files consistency in current CDK/docs guidance)

## Prefer S3 Files when

- [ ] Reads dominate; writes are whole-object or append-friendly
- [ ] You want to avoid VPC + mount-target plumbing
- [ ] Capacity providers / Managed Instances are **not** in scope (incompatible as of GA)
- [ ] Storage cost at S3 rates matters more than POSIX semantics
- [ ] Versioning on the bucket is acceptable operationally

## Prefer EFS when

- [ ] You need POSIX / random writes / shared mutable working sets
- [ ] Multiple writers coordinate on the same file paths
- [ ] Capacity providers or Managed Instances are required
- [ ] You already operate VPC + EFS for other workloads

## Hard incompatibilities (verify before design review)

- [ ] S3 Files **cannot** be used with Lambda capacity providers / Managed Instances
- [ ] One function → one mount (S3 Files **or** EFS, not both)
- [ ] IAM needs `s3files:ClientMount` / `s3files:ClientWrite` (not classic `elasticfilesystem:*` alone)

## Cost sanity (order-of-magnitude)

- S3 Standard storage ≈ \$0.023/GB-month (region-dependent) vs EFS Standard ≈ \$0.30/GB-month — storage often dominates for large shared corpora
- AWS documents S3 Files as **no separate mount fee** beyond standard Lambda + S3 charges — still model request/transfer and any EFS alternative networking

## Reproduce

```bash
# Confirm versioning on candidate bucket
aws s3api get-bucket-versioning --bucket YOUR_BUCKET --region us-east-1

# Confirm function does not use capacity provider before attaching S3 Files
aws lambda get-function-configuration --function-name YOUR_FN \
  --query '{PackageType:PackageType,FileSystemConfigs:FileSystemConfigs}'
```
