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

- **ID:** `cloud/aws-efs-mount-timeout-lambda`
- **领域:** cloud
- **类别:** network_error
- **验证级别:** ai_generated
- **修复率:** 82%

## 根因

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

## 版本兼容性

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

## 解决方案

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
   ```

## 无效尝试

- **** — The 3-second timeout is hardcoded in the Lambda EFS mount helper and cannot be changed by increasing the function timeout (99% 失败率)
- **** — The Lambda execution environment does not have permissions or tools to mount EFS manually; only the managed mount helper works (95% 失败率)
