简体   繁体   中英

Is it possible to connect an AWS Lambda function without a VPC connection to AWS EFS?

I want to connect AWS EFS to my AWS Lambda function, without connecting the Lambda function to VPC. Is it possible to do this?

This is simply No. It's impossible.

EFS file systems are always created within a customer VPC, so Lambda functions using the EFS file system must all reside in the same VPC.

Like stated here ( https://aws.amazon.com/blogs/compute/using-amazon-efs-for-aws-lambda-in-your-serverless-applications ) Lambda should be placed within same VPC where EFS is created.

There might be different reasons you didn't like to place your Lambda function in VPC:

  • Very slow initialization (Creating ENI, Attaching Lambda to it.. This takes long time significantly)
  • Additional configuration to place in VPC etc..

One solution is to use provisioned concurrency feature of Lambda (It comes with more costing) In this way, you can get multiple Lambda functions ready to use any time by keeping it warm.

Cheers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM