Mount S3 File System in AWS Lambda?

倖福魔咒の 提交于 2019-12-12 16:06:27

问题


Do you know if it possible mounting a File System over AWS S3 to increase AWS Lambda storage?


回答1:


You cannot mount Amazon S3 as a filesystem for use with AWS Lambda.

AWS Lambda functions are designed to be short-running scripts that respond to an event in your environment (eg data coming into a Kinesis stream, a file being created in Amazon S3). They typically run only for a few seconds.

While you haven't described your use-case, something that requires heavy use of a filesystem is not a typically good use of a Lambda function.

You can, of course, retrieve and create objects in Amazon S3 via SDK calls from the Lambda function. This is a very fast and efficient way to load/store data from Lambda.




回答2:


The storage space provided with lambda is actually Ephemeral disk space that can be used for temporary storage during lambda execution only. It is limited to 512 Mb and can't be increased.

If your use-case needs more space for lambda than you can store and retrieve objects directly from s3 . It's highly fast and efficient. Moreover , s3 doesn't provide a file system , it is only object based storage and every folder , subfolder, and every file represents an object in s3 which virtually seems like a hierarchical structure but in actual it's not.

While the temporary disk space in lambda has a hierarchical file structure



来源:https://stackoverflow.com/questions/50982548/mount-s3-file-system-in-aws-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!