在AWS Lamda中部署功能(程序包大小超出) [英] Deploy function in AWS Lamda (package size exceeds)

查看:53
本文介绍了在AWS Lamda中部署功能(程序包大小超出)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在AWS Lambda上部署我的功能.我需要以下程序包才能使代码正常运行:

I am trying to deploy my function on AWS Lambda. I need the following packages for my code to function:

  • keras-tensorflow
  • 枕头
  • scipy
  • numpy
  • 熊猫

我尝试使用docker安装并上传zip文件,但该文件超出了文件大小.

I tried installing using docker and uploading the zip file, but it exceeds the file size.

可以解决这个问题吗?如何将这些包用于我的Lambda函数?

Is there a get around for this? How to use these packages for my Lambda function?

推荐答案

而是将程序包发布在AWS Lambda层中,并从您的代码中引用它.在AWS Lambda层中发布的软件包将一直存在,并且无需在Lambda冷启动时实例化.

publish your packages in AWS Lambda layer instead, and reference it from your code. The packages published in the AWS Lambda layer will be there all the time and will not need to instantiate whenever the Lambda cold start.

有来自AWS官方网站的完整文档:此处

There is complete documentation from official AWS Websites: Here

这篇关于在AWS Lamda中部署功能(程序包大小超出)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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