Overview
Amazon Elastic File System (EFS) provides shared, persistent file storage for Kubernetes pods. This is ideal for storing AI models that can be shared across multiple Lightning ASR pods, eliminating duplicate downloads and reducing startup time.Benefits of EFS
Shared Storage
Multiple pods can read/write simultaneously (ReadWriteMany)
Automatic Scaling
Storage grows and shrinks automatically
Fast Startup
Models cached once, used by all pods
Cost Effective
Pay only for storage used, no upfront provisioning
Prerequisites
1
EFS CSI Driver
Install the EFS CSI driver (see IAM & IRSA guide)
2
VPC and Subnets
Note your EKS cluster’s VPC ID and subnet IDs:
3
Security Group
Note your cluster security group ID:
Create EFS File System
Using AWS Console
1
Navigate to EFS
Go to AWS Console → EFS → Create file system
2
Configure File System
- Name:
smallest-models - VPC: Select your EKS cluster VPC
- Availability and Durability: Regional (recommended)
- Click “Customize”
3
File System Settings
- Performance mode: General Purpose
- Throughput mode: Bursting (or Elastic for production)
- Encryption: Enable encryption at rest
- Click “Next”
4
Network Access
- Select all subnets where EKS nodes run
- Security group: Select cluster security group
- Click “Next”
5
Review and Create
Review settings and click “Create”Note the File system ID (e.g.,
fs-0123456789abcdef)Using AWS CLI
Configure Security Group
Ensure the security group allows NFS traffic (port 2049) from cluster nodes:If the rule already exists, you’ll see an error. This is safe to ignore.
Deploy with EFS in Helm
Update yourvalues.yaml to enable EFS:
values.yaml
fs-0123456789abcdef with your actual EFS file system ID.
Deploy or Upgrade
Verify EFS Configuration
Check Storage Class
Check Persistent Volume
Check Persistent Volume Claim
Verify Mount in Pod
Test EFS
Create a test file in one pod and verify it’s visible in another:Write test file:
Read from another pod:
test
How Model Caching Works
With EFS enabled:-
First Pod Startup:
- Pod downloads model from
asrModelUrl - Saves model to
/app/models(EFS mount) - Takes 5-10 minutes (one-time download)
- Pod downloads model from
-
Subsequent Pod Startups:
- Pod checks
/app/modelsfor existing model - Finds model already downloaded
- Skips download, loads from EFS
- Takes 30-60 seconds
- Pod checks
This is especially valuable when using autoscaling, as new pods start much faster.
Performance Tuning
Choose Throughput Mode
- Bursting (Default)
- Elastic
- Provisioned
Best for: Development, testing, variable workloads
- Throughput scales with storage size
- 50 MB/s per TB of storage
- Bursting to 100 MB/s
- Most cost-effective
Enable Lifecycle Management
Automatically move infrequently accessed files to lower-cost storage:Cost Optimization
Monitor EFS Usage
Estimate Costs
EFS pricing (us-east-1):- Standard storage: ~$0.30/GB/month
- Infrequent Access: ~$0.025/GB/month
- Data transfer: Free within same AZ
- Standard: ~$15/month
- With IA (after 30 days): ~$1.25/month
Backup and Recovery
Enable AWS Backup
Manual Backup
EFS automatically creates point-in-time backups. Access via AWS Console → EFS → Backups.Troubleshooting
Mount Failed
Check EFS CSI driver:Slow Performance
Check throughput mode:PermittedThroughputBurstCreditBalanceClientConnections
Permission Denied
Check mount options in PV:Alternative: EBS for Single Pod
If you don’t need shared storage (single replica only):values.yaml
What’s Next?
Model Storage
Optimize model storage and caching strategies
HPA Configuration
Enable autoscaling with shared model storage

