cloud network_error ai_generated true

任务在挂载 EFS 文件系统时在 3.00 秒后超时。请确保 VPC 配置正确,并且 Lambda 函数的 VPC 可以访问 EFS 文件系统。

Task timed out after 3.00 seconds while mounting EFS file system. Ensure that the VPC is configured correctly and the EFS file system is accessible from the Lambda function's VPC.

ID: cloud/aws-efs-mount-timeout-lambda

其他格式: JSON · Markdown 中文 · English
82%修复率
88%置信度
1证据数
2023-10-05首次发现

版本兼容性

版本状态引入弃用备注
AWS Lambda runtime Node.js 18 active
AWS Lambda runtime Python 3.11 active
EFS Mount Helper 1.0.0 active

根因分析

AWS Lambda 的 EFS 挂载操作有硬性的 3 秒超时;如果由于缺少 VPC 端点、安全组规则或子网路由而导致无法访问 EFS 文件系统,则挂载会失败。

English

AWS Lambda's EFS mount operation has a hard 3-second timeout; if the EFS file system is not reachable due to missing VPC endpoints, security group rules, or subnet routing, the mount fails.

generic

官方文档

https://docs.aws.amazon.com/lambda/latest/dg/services-efs.html

解决方案

  1. Verify VPC configuration: ensure Lambda is attached to a private subnet with a NAT gateway or VPC endpoints for EFS (`com.amazonaws.region.elasticfilesystem`), and that the security group allows inbound NFS (port 2049) from the Lambda security group
  2. Check EFS access point policy: ensure the IAM role for Lambda has `elasticfilesystem:ClientMount` permission on the access point ARN

无效尝试

常见但无效的做法:

  1. 99% 失败

    The 3-second timeout is hardcoded in the Lambda EFS mount helper and cannot be changed by increasing the function timeout

  2. 95% 失败

    The Lambda execution environment does not have permissions or tools to mount EFS manually; only the managed mount helper works