简体   繁体   中英

AWS Lambda Deployment Package in Python

I want to deploy python code on aws Lambda.

My deployment package contains sklearn, pandas, xgboost... so is way larger than 50mb.

How can I manage? I am pretty new to aws so i read that i can upload my deployment package to S3 bucket. But how does it works to import the code from s3 to lambda?

Thanks a lot for your answers !

Note that AWS Lambda has a limit of 250 MBs unzipped, if dependencies are bigger than that, you have the option of using some other service, or trying to split lambda into two.

But if it is < 250 MBs (unzipped), but > 50 MBs (zipped) than uploading to S3 actually makes sense.

Once you've created a deployment package , you can create a bucket . Then upload deployment package .

In S3 when you click on uploaded deployment package, you will see the Object URL, this is the one that you need to paste into Amazon S3 link URL in Lambda function configuration and hit save.

从 S3 中选择部署包

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