我可以在AWS Lambda Function上存储临时文件吗? [英] Can I store a temp file on AWS Lambda Function?

查看:82
本文介绍了我可以在AWS Lambda Function上存储临时文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写用于文件提取的lambda函数,并且在执行此功能时需要存储文件,因此需要将该文件存储在aws lambda函数中.是否可以在lambda上存储文件.

I am writing a lambda function for file extraction and need to store a file while performing this function so need to store that file in aws lambda function . Is it possible to store store a file on lambda .

推荐答案

是的,引用AWS Lambda常见问题解答

Yes, quoting from the AWS Lambda FAQ

每个Lambda函数在其自己的/tmp目录中接收500MB的非永久磁盘空间.

Each Lambda function receives 500MB of non-persistent disk space in its own /tmp directory.

https://aws.amazon.com/lambda/faqs/

请注意,正如注释者所指出的那样,仅可靠地执行函数即可.您无法控制执行环境,因此后续运行可能会在lambda函数的不同实例中进行.

Note that as the commenters point out, it is only reliably there for a single execution of your function. You don't have control over the execution environment, so subsequent runs may be in different instances of your lambda function.

如果需要使数据更具持久性,则应使用AWS S3.

If you need the data to be more persistent you should use AWS S3.

这篇关于我可以在AWS Lambda Function上存储临时文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆