Back to results for “File System”
AWS › Amazon EFS (Elastic File System)

How does EFS integrate with AWS Lambda and containerized workloads like ECS?

Advanced

Answer

EFS can be mounted directly by Lambda functions and by ECS tasks, giving serverless and containerized workloads access to a persistent, shared file system that survives beyond the lifecycle of a single function invocation or container restart, which is especially useful for tasks like storing machine learning model files or shared configuration data that many function invocations need to access.
aws lambda update-function-configuration --function-name myFunction --file-system-configs Arn=arn:aws:elasticfilesystem:us-east-1:123456789012:access-point/fsap-12345678,LocalMountPath=/mnt/efs
Real-world example A machine learning inference service uses Lambda functions mounted to an EFS file system to access large pretrained model files that are too big to package directly with each function, avoiding repeated downloads on every invocation.

Common follow-ups: What are the performance considerations when Lambda functions access EFS?;How does mounting EFS affect Lambda cold start times?