Lambda及其层 (Lambda and its Layers)
When I first heard about AWS Lambda I was quite confused about what it was and tried to use it to train a simple ML model but was hit with a hard 5 minutes execution limit. Fast-forward a few years, I believe Lambda has evolved a lot and so have people’s understanding of event-driven systems and serverless compute. It has become part of many modern applications and data architects.
当我第一次听说AWS Lambda时,我对它的含义感到非常困惑,并试图使用它来训练一个简单的ML模型,但是受到5分钟硬执行限制的打击。 几年过去了,我相信Lambda取得了长足的发展,人们对事件驱动系统和无服务器计算的理解也是如此。 它已成为许多现代应用程序和数据架构师的一部分。
At re:Invent 2018, Lambda was heavily buffed with custom runtime and an increase in execution runtime limit to 15 minutes. Lambda Layers was also released which allowed you to share common dependencies to ease lambda deployment size and updates. However, AWS still hasn’t addressed the needs of friendly steps to bring in non-native python packages such as Pandas.
在re:Invent 2018上 ,Lambda大量沉迷于自定义运行时并将执行时运行时间限制增加到15分钟。 Lambda Layers也已发布,它使您可以共享常见的依赖项,以简化lambda部署的大小和更新。 但是,AWS仍未解决引入非本地python软件包(例如Pandas) 的友好步骤的需求 。
引入外部软件包的麻烦方法… (The troublesome approaches to bringing in external packages…)
Currently, you either have to zip up your Lambda function and Linux compatible dependencies, or upload your dependencies as a Lambda Layers. If you’ve played around with Google Cloud Functions and Azure Function before then you would know that it can be as easy as to writing a wish list in the requirements.txt
.
当前,您要么压缩您的Lambda函数和与Linux兼容的依赖项,要么将您的依赖项作为Lambda图层上载。 如果您以前玩过Google Cloud Functions和Azure Func